Fix --foo[=bar] parsing in _parse_help().

This commit is contained in:
Ville Skyttä 2011-04-25 11:43:57 +03:00
parent 6e809d032c
commit 095b5a02d2

View File

@ -748,7 +748,7 @@ _init_completion()
_parse_help() _parse_help()
{ {
$1 ${2:---help} 2>&1 | sed -e '/^[[:space:]]*-/!d' -e 's|[,/]| |g' | \ $1 ${2:---help} 2>&1 | sed -e '/^[[:space:]]*-/!d' -e 's|[,/]| |g' | \
awk '{ print $1; if ($2 ~ /^-/) { print $2 } }' | sed -e 's|[<=].*||' awk '{ print $1; if ($2 ~ /^-/) { print $2 } }' | sed -e 's|[<=[].*||'
} }
# This function completes on signal names # This function completes on signal names