[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 1.90-39-g6f58a69

Igor Murzov e-mail at date.by
Thu Nov 10 23:37:04 UTC 2011


The following commit has been merged in the master branch:
commit 6f58a699918b7bb22c6355223d7456076b53dc46
Author: Igor Murzov <e-mail at date.by>
Date:   Fri Nov 11 02:46:23 2011 +0300

    removepkg: Make it possible to complete filenames.
    
    Reported-by: disturbed1
    Tested-by: Sergey V <sftp.mtuci at gmail.com>

diff --git a/completions/removepkg b/completions/removepkg
index 5b3d827..2fb7986 100644
--- a/completions/removepkg
+++ b/completions/removepkg
@@ -4,12 +4,17 @@ _removepkg()
 {
     local cur prev words cword
     _init_completion || return
-    if [[ "$cur" == -* ]]; then
+    if [[ $cur == -* ]]; then
         COMPREPLY=( $( compgen -W '-copy -keep -preserve -warn' \
             -- "$cur" ) )
         return 0
     fi
 
+    if [[ $cur == */* ]]; then
+        _filedir
+        return 0
+    fi
+
     local root=${ROOT:-/}
     COMPREPLY=( $( cd "$root/var/log/packages" 2> /dev/null || return 1 ; \
         compgen -f -- "$cur" ) )

-- 
bash-completion



More information about the Bash-completion-commits mailing list