[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 1.3-410-g346624b

Ville Skyttä ville.skytta at iki.fi
Thu Jul 21 21:15:52 UTC 2011


The following commit has been merged in the master branch:
commit fe4ae55f34cc3f3a7b671a235a8d11eae5747f99
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Thu Jul 21 23:57:49 2011 +0300

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

diff --git a/bash_completion b/bash_completion
index f5ae06b..b1b941c 100644
--- a/bash_completion
+++ b/bash_completion
@@ -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
 

-- 
bash-completion



More information about the Bash-completion-commits mailing list