_longopt: Don't use -o default with it to make splitting work as intended.

This commit is contained in:
Ville Skyttä 2011-07-21 23:57:49 +03:00
parent f896a7e7b2
commit fe4ae55f34

View File

@ -1651,7 +1651,6 @@ _longopt()
case "${prev,,}" in case "${prev,,}" in
--*dir*) --*dir*)
compopt +o default
_filedir -d _filedir -d
return 0 return 0
;; ;;
@ -1664,7 +1663,6 @@ _longopt()
"s|.*$prev\[\{0,1\}=[<[]\{0,1\}\([-A-Za-z0-9_]\{1,\}\).*|\1|p" ) "s|.*$prev\[\{0,1\}=[<[]\{0,1\}\([-A-Za-z0-9_]\{1,\}\).*|\1|p" )
case ${argtype,,} in case ${argtype,,} in
*dir*) *dir*)
compopt +o default
_filedir -d _filedir -d
return 0 return 0
;; ;;
@ -1684,7 +1682,6 @@ _longopt()
-- "$cur" ) ) -- "$cur" ) )
[[ $COMPREPLY == *= ]] && compopt -o nospace [[ $COMPREPLY == *= ]] && compopt -o nospace
elif [[ "$1" == @(mk|rm)dir ]]; then elif [[ "$1" == @(mk|rm)dir ]]; then
compopt +o default
_filedir -d _filedir -d
else else
_filedir _filedir
@ -1697,7 +1694,7 @@ for i in a2ps awk bash bc bison cat colordiff cp csplit \
mv netstat nl nm objcopy objdump od paste patch pr ptx readelf rm rmdir \ mv netstat nl nm objcopy objdump od paste patch pr ptx readelf rm rmdir \
sed seq sha{,1,224,256,384,512}sum shar sort split strip sum tac tail tee \ sed seq sha{,1,224,256,384,512}sum shar sort split strip sum tac tail tee \
texindex touch tr uname unexpand uniq units vdir wc wget who; do texindex touch tr uname unexpand uniq units vdir wc wget who; do
have $i && complete -F _longopt -o default $i have $i && complete -F _longopt $i
done done
unset i unset i