Use compgen -W in _longopt().
This commit is contained in:
parent
3e016e4679
commit
a679544447
@ -4275,9 +4275,9 @@ _longopt()
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$cur" == -* ]]; then
|
if [[ "$cur" == -* ]]; then
|
||||||
COMPREPLY=( $( $1 --help 2>&1 | sed -e '/--/!d' \
|
COMPREPLY=( $( compgen -W "$( $1 --help 2>&1 | sed -e '/--/!d' \
|
||||||
-e 's/.*\(--[-A-Za-z0-9]\+\).*/\1/' | \
|
-e 's/.*\(--[-A-Za-z0-9]\+\).*/\1/' |sort -u )"\
|
||||||
command grep "^$cur" | sort -u ) )
|
-- $cur ) )
|
||||||
elif [[ "$1" == rmdir ]]; then
|
elif [[ "$1" == rmdir ]]; then
|
||||||
_filedir -d
|
_filedir -d
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user