1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
From 0b7189d4eee4597e11cab02e6b4dcae488db5ca8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ville=20Skytt=C3=A4?= <ville.skytta@iki.fi>
Date: Wed, 16 Mar 2016 12:28:29 +0200
Subject: [PATCH 3/5] tar: Fix GNU tar help output parsing regex, fixes #15
---
completions/tar | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/completions/tar b/completions/tar
index 6e4c74c..0a5f588 100644
--- a/completions/tar
+++ b/completions/tar
@@ -105,7 +105,7 @@ __gnu_tar_parse_help()
# or more options separated by ', ' separator string. We are matching
# like this then: ^<spaces>(<separator>?<option>)+<whatever>$
if [[ "$line" =~ \
- ^[[:blank:]]{1,10}(((,[[:blank:]])?(--?([\]\[a-zA-Z0-9?-=]+))(,[[:space:]])?)+).*$ ]]; then
+ ^[[:blank:]]{1,10}(((,[[:blank:]])?(--?([\]\[a-zA-Z0-9?=-]+))(,[[:space:]])?)+).*$ ]]; then
line=${BASH_REMATCH[1]}
str="${line//,/ }"
--
2.7.2
|