The following commit has been merged in the master branch:
commit fd2bd342e00248fda5aa7022e571eaf2f09d5f0d
Author: Ville Skyttä <[email protected]>
Date: Thu Apr 28 12:47:52 2011 +0300
_parse_help: Fix --foo={bar,quux} handling.
diff --git a/bash_completion b/bash_completion
index b52f5a9..ae20dc0 100644
--- a/bash_completion
+++ b/bash_completion
@@ -759,7 +759,7 @@ _parse_help()
if ($i !~ /^-/) { break }
}
if (x == -1) { x = 1 }
- sub("[=<[].*", "", $x);
+ sub("[=<{[].*", "", $x);
print $x
}'
}
diff --git a/test/unit/_parse_help.exp b/test/unit/_parse_help.exp
index 8803ffe..6be5afb 100644
--- a/test/unit/_parse_help.exp
+++ b/test/unit/_parse_help.exp
@@ -85,5 +85,9 @@ set cmd {fn() { printf '%s\n' "--foo=<bar>"; }; _parse_help
fn}
assert_bash_list "--foo" $cmd "long with value in angle brackets"
sync_after_int
+set cmd {fn() { printf '%s\n' "--foo={bar,quux}"; }; _parse_help fn}
+assert_bash_list "--foo" $cmd "long with value in curly brackets"
+sync_after_int
+
teardown
--
bash-completion
_______________________________________________
Bash-completion-commits mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/bash-completion-commits