[Bash-completion-commits] [SCM] bash-completion branch, frozen/1.0, updated. 64713d3b8a7a742882a6f9f5863dc8fbb8b8c509
Freddy Vulto
fvulto at gmail.com
Sun Mar 1 16:11:19 UTC 2009
The following commit has been merged in the frozen/1.0 branch:
commit 64713d3b8a7a742882a6f9f5863dc8fbb8b8c509
Author: Freddy Vulto <fvulto at gmail.com>
Date: Sun Mar 1 16:59:38 2009 +0100
Moved commented quote outside subshell
Moved comment-containing-quotes to outside subshell since commented
quotes cause error messages in bash <= 3.1. See also:
http://www.mail-archive.com/bug-bash@gnu.org/msg01667.html
diff --git a/bash_completion b/bash_completion
index d77338d..e00aa22 100644
--- a/bash_completion
+++ b/bash_completion
@@ -273,15 +273,19 @@ _filedir()
local toks=( ) tmp
+ # TODO: I've removed a "[ -n $tmp ] &&" before `echo $tmp',
+ # and everything works again. If this bug
+ # suddenly appears again (i.e. "cd /b<TAB>"
+ # becomes "cd /"), remember to check for
+ # other similar conditionals (here and
+ # _filedir_xspec()). --David
+ # NOTE: The comment above has been moved outside of the subshell below,
+ # because quotes-in-comments-in-a-subshell cause errors on
+ # bash-3.1. See also:
+ # http://www.mail-archive.com/bug-bash@gnu.org/msg01667.html
toks=( ${toks[@]-} $(
compgen -d -- "$(quote_readline "$cur")" | {
while read -r tmp; do
- # TODO: I've removed a "[ -n $tmp ] &&" before,
- # and everything works again. If this bug
- # suddenly appears again (i.e. "cd /b<TAB>"
- # becomes "cd /"), remember to check for
- # other similar conditionals (here and
- # _filedir_xspec()). --David
echo $tmp
done
}
--
bash-completion
More information about the Bash-completion-commits
mailing list