[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 1064bb1c14e2c86c69e58e3fa30f481a79286f59
Freddy Vulto
fvulto at gmail.com
Sat Nov 28 16:46:58 UTC 2009
The following commit has been merged in the master branch:
commit 1064bb1c14e2c86c69e58e3fa30f481a79286f59
Author: Freddy Vulto <fvulto at gmail.com>
Date: Sat Nov 28 17:44:33 2009 +0100
Removed array parameter expansion
The testsuite failed on _known_hosts_real on bash-3. After long searching, it
appears that on bash-3 (not bash-4) array expansion with a modified IFS causes
the array to merge into a single item (!). See also:
http://www.mail-archive.com/bug-bash@gnu.org/msg06520.html
The effect was that multiple UserKnownHostsFiles in one config file weren't
detected properly.
The faulting parameter expansion ("${tmpkh[@]//\"/}) actually isn't necessary
anymore, since eval is done now, so it is removed.
diff --git a/bash_completion b/bash_completion
index 2b528af..05f5c91 100644
--- a/bash_completion
+++ b/bash_completion
@@ -1265,7 +1265,7 @@ _known_hosts_real()
# spaces in their name work (watch out for ~ expansion
# breakage! Alioth#311595)
tmpkh=( $( sed -ne 's/^[ \t]*\([Gg][Ll][Oo][Bb][Aa][Ll]\|[Uu][Ss][Ee][Rr]\)[Kk][Nn][Oo][Ww][Nn][Hh][Oo][Ss][Tt][Ss][Ff][Ii][Ll][Ee]['"$'\t '"']*\(.*\)$/\2/p' "${config[@]}" | sort -u ) )
- for i in "${tmpkh[@]//\"/}"; do
+ for i in "${tmpkh[@]}"; do
i=$( eval echo "$i" ) # expand ~
[ -r "$i" ] && kh=( "${kh[@]}" "$i" )
done
--
bash-completion
More information about the Bash-completion-commits
mailing list