Be stricter when finding long options in _longopt.
This commit is contained in:
parent
93060b4133
commit
c820944d2e
@ -1525,8 +1525,8 @@ _longopt()
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$cur" == -* ]]; then
|
if [[ "$cur" == -* ]]; then
|
||||||
COMPREPLY=( $( compgen -W "$( $1 --help 2>&1 | sed -e '/--/!d' \
|
COMPREPLY=( $( compgen -W "$( $1 --help 2>&1 | \
|
||||||
-e 's/.*\(--[-A-Za-z0-9]\{1,\}\).*/\1/' | sort -u )" \
|
sed -ne 's/.*\(--[-A-Za-z0-9]\{1,\}\).*/\1/p' | sort -u )" \
|
||||||
-- "$cur" ) )
|
-- "$cur" ) )
|
||||||
elif [[ "$1" == rmdir ]]; then
|
elif [[ "$1" == rmdir ]]; then
|
||||||
_filedir -d
|
_filedir -d
|
||||||
|
Loading…
x
Reference in New Issue
Block a user