[Bash-completion-commits] [SCM] bash-completion branch, master, updated. d37b36605e4f7b12e079d37d5a60598a12fb57bb

Ville Skyttä ville.skytta at iki.fi
Sun Jan 2 21:53:44 UTC 2011


The following commit has been merged in the master branch:
commit d37b36605e4f7b12e079d37d5a60598a12fb57bb
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Sun Jan 2 23:49:58 2011 +0200

    Do _filedir in _command_offset only for commands with no completions installed.
    
    If we have a completion installed for the actual command invoked via
    sudo etc, it is very much possible and fine that no completions are
    returned from it, and doing _filedir in these cases is not the right
    thing to do.

diff --git a/bash_completion b/bash_completion
index e4787f2..61d450c 100644
--- a/bash_completion
+++ b/bash_completion
@@ -1527,10 +1527,10 @@ _command_offset()
                 cspec=${cspec%%${cmd##*/}};
                 COMPREPLY=( $( eval compgen "$cspec" -- "$cur" ) );
             fi
+        elif [ ${#COMPREPLY[@]} -eq 0 ]; then
+            _filedir
         fi
     fi
-
-    [ ${#COMPREPLY[@]} -eq 0 ] && _filedir
 }
 complete -F _command aoss command do else eval exec ltrace nice nohup padsp \
     then time tsocks vsound xargs

-- 
bash-completion



More information about the Bash-completion-commits mailing list