_parse_help: Fix --foo={bar,quux} handling.
This commit is contained in:
parent
efeb1a22dd
commit
fd2bd342e0
@ -759,7 +759,7 @@ _parse_help()
|
|||||||
if ($i !~ /^-/) { break }
|
if ($i !~ /^-/) { break }
|
||||||
}
|
}
|
||||||
if (x == -1) { x = 1 }
|
if (x == -1) { x = 1 }
|
||||||
sub("[=<[].*", "", $x);
|
sub("[=<{[].*", "", $x);
|
||||||
print $x
|
print $x
|
||||||
}'
|
}'
|
||||||
}
|
}
|
||||||
|
@ -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"
|
assert_bash_list "--foo" $cmd "long with value in angle brackets"
|
||||||
sync_after_int
|
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
|
teardown
|
||||||
|
Loading…
x
Reference in New Issue
Block a user