The following commit has been merged in the master branch:
commit 5a29589fcadeac3ae9f1f5f2f8600468d3f90d39
Author: Guillaume Rousse <[email protected]>
Date:   Sat Apr 3 21:42:13 2010 +0200

    fix _filedir completion for path with non-ascii chars, by evaluating the 
result of _quote_readline_by_ref

diff --git a/bash_completion b/bash_completion
index 024b4e0..8626fd2 100644
--- a/bash_completion
+++ b/bash_completion
@@ -590,7 +590,10 @@ _filedir()
     #
     if [[ "$1" != -d ]]; then
         xspec=${1:+"!*.$1"}
-        if [[ ${cur:0:1} == "'" && ${BASH_VERSINFO[0]} -ge 4 ]]; then
+        # in some situation, _quote_readline_by_ref actually overquote,
+        # hence the need to eval the result
+        if [[ ${cur:0:1} == "'" && ${BASH_VERSINFO[0]} -ge 4 ]] || \
+           [[ ${quoted:0:1} == '$' ]]; then
             toks=( ${to...@]-} $(
                 eval compgen -f -X \"\$xspec\" -- $quoted
             ) )

-- 
bash-completion

_______________________________________________
Bash-completion-commits mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/bash-completion-commits

Reply via email to