_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
--*dir*)
compopt +o default
_filedir -d
return 0
;;
@ -1664,7 +1663,6 @@ _longopt()
"s|.*$prev\[\{0,1\}=[<[]\{0,1\}\([-A-Za-z0-9_]\{1,\}\).*|\1|p" )
case ${argtype,,} in
*dir*)
compopt +o default
_filedir -d
return 0
;;
@ -1684,7 +1682,6 @@ _longopt()
-- "$cur" ) )
[[ $COMPREPLY == *= ]] && compopt -o nospace
elif [[ "$1" == @(mk|rm)dir ]]; then
compopt +o default
_filedir -d
else
_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 \
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
have $i && complete -F _longopt -o default $i
have $i && complete -F _longopt $i
done
unset i