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

Ville Skyttä ville.skytta at iki.fi
Sat Oct 23 11:39:04 UTC 2010


The following commit has been merged in the master branch:
commit 768bbc7858202cb28ff97b155bfd24e568b44f06
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Sat Oct 23 14:17:49 2010 +0300

    Turn on -o filenames automatically also with _filedir -d.

diff --git a/bash_completion b/bash_completion
index 2a0124a..410ecef 100644
--- a/bash_completion
+++ b/bash_completion
@@ -642,12 +642,12 @@ _filedir()
             xspec=${1:+"!*.@($1|${1^^})"} || \
             xspec=${1:+"!*.@($1|$(printf %s $1 | tr '[:lower:]' '[:upper:]'))"}
         toks=( ${toks[@]-} $( compgen -f -X "$xspec" -- $quoted) )
-        if [ ${#toks[@]} -ne 0 ]; then
-            # Turn on -o filenames; see http://bugs.debian.org/272660#64 for
-            # info about the compgen hack (bash < 4)
-            compopt -o filenames 2>/dev/null || \
-                compgen -f /non-existing-dir/ >/dev/null
-        fi
+    fi
+    if [ ${#toks[@]} -ne 0 ]; then
+        # Turn on -o filenames; see http://bugs.debian.org/272660#64 for info
+        # about the compgen hack (bash < 4)
+        compopt -o filenames 2>/dev/null || \
+            compgen -f /non-existing-dir/ >/dev/null
     fi
 
     COMPREPLY=( "${COMPREPLY[@]}" "${toks[@]}" )

-- 
bash-completion



More information about the Bash-completion-commits mailing list