[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 2.0-85-g49ea121

Ville Skyttä ville.skytta at iki.fi
Fri Dec 28 16:39:13 UTC 2012


The following commit has been merged in the master branch:
commit 49ea121e5d86eea76bfa18174fd8f70911217d09
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Fri Dec 28 18:37:42 2012 +0200

    man: Don't expand man page extensions too early.
    
    Breaks for example subdir completions if there is a subdir whose name
    matches extensions in the current dir.

diff --git a/completions/man b/completions/man
index 9a66663..6e42f85 100644
--- a/completions/man
+++ b/completions/man
@@ -18,7 +18,7 @@ _man()
             return
             ;;
         -l|--local-file)
-            _filedir $manext
+            _filedir "$manext"
             return
             ;;
         -M|--manpath)
@@ -52,7 +52,7 @@ _man()
 
     # file based completion if parameter looks like a path
     if [[ "$cur" == @(*/|[.~])* ]]; then
-        _filedir $manext
+        _filedir "$manext"
         return 0
     fi
 
@@ -91,7 +91,7 @@ _man()
         # File based completion for the rest, prepending ./ if needed
         # (man 1.6f needs that for man pages in current dir)
         local i start=${#COMPREPLY[@]}
-        _filedir $manext
+        _filedir "$manext"
         for (( i=$start; i < ${#COMPREPLY[@]}; i++ )); do
             [[ ${COMPREPLY[i]} == */* ]] || COMPREPLY[i]=./${COMPREPLY[i]}
         done
diff --git a/test/fixtures/_filedir/a b/i b/test/fixtures/man/man/quux.8
similarity index 100%
copy from test/fixtures/_filedir/a b/i
copy to test/fixtures/man/man/quux.8
diff --git a/test/lib/completions/man.exp b/test/lib/completions/man.exp
index c7358c6..66b565a 100644
--- a/test/lib/completions/man.exp
+++ b/test/lib/completions/man.exp
@@ -30,4 +30,8 @@ assert_complete "Bash::Completion" "man Bash::C"
 sync_after_int
 
 
+assert_complete_dir "man/quux.8" "man man/" $::srcdir/fixtures/man
+sync_after_int
+
+
 teardown

-- 
bash-completion



More information about the Bash-completion-commits mailing list