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

Ville Skyttä ville.skytta at iki.fi
Sun Sep 19 08:37:24 UTC 2010


The following commit has been merged in the master branch:
commit 8e23895fe5683417717c2461443a378e418ce1e9
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Sun Sep 19 11:33:52 2010 +0300

    Avoid stderr output from compopt when invoking _filedir directly.
    
    The _filedir unit test currently does this, causing (harmless) error output.

diff --git a/bash_completion b/bash_completion
index 22c3314..e6edf87 100644
--- a/bash_completion
+++ b/bash_completion
@@ -640,7 +640,7 @@ _filedir()
         toks=( ${toks[@]-} $( compgen -f -X "$xspec" -- $quoted) )
         if [ ${#toks[@]} -ne 0 ]; then
             # If `compopt' is available, set `-o filenames'
-            type compopt &>/dev/null && compopt -o filenames ||
+            type compopt &>/dev/null && compopt -o filenames 2>/dev/null ||
             # No, `compopt' isn't available;
             # Is `-o filenames' set?
             [[ (

-- 
bash-completion



More information about the Bash-completion-commits mailing list