Be stricter when finding long options in _longopt.

This commit is contained in:
Ville Skyttä 2009-11-03 22:28:10 +02:00
parent 93060b4133
commit c820944d2e

View File

@ -1525,8 +1525,8 @@ _longopt()
fi
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W "$( $1 --help 2>&1 | sed -e '/--/!d' \
-e 's/.*\(--[-A-Za-z0-9]\{1,\}\).*/\1/' | sort -u )" \
COMPREPLY=( $( compgen -W "$( $1 --help 2>&1 | \
sed -ne 's/.*\(--[-A-Za-z0-9]\{1,\}\).*/\1/p' | sort -u )" \
-- "$cur" ) )
elif [[ "$1" == rmdir ]]; then
_filedir -d