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