The following commit has been merged in the master branch:
commit 487088e1d215a10351ecde1ce13cd9cab0b5b221
Author: Ville Skyttä <[email protected]>
Date: Thu Nov 26 23:46:36 2009 +0200
Weed out duplicate known hosts files to check.
https://bugzilla.redhat.com/show_bug.cgi?id=541423#c4
diff --git a/bash_completion b/bash_completion
index e3b782c..2b528af 100644
--- a/bash_completion
+++ b/bash_completion
@@ -1256,6 +1256,7 @@ _known_hosts_real()
config=( "${conf...@]}" "${HOME}/.ssh2/config" )
fi
+ # Known hosts files from configs
if [ ${#conf...@]} -gt 0 ]; then
local OIFS=$IFS IFS=$'\n'
local -a tmpkh
@@ -1263,7 +1264,7 @@ _known_hosts_real()
# TODO(?): try to make known hosts files with more than one consecutive
# 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' "${conf...@]}" ) )
+ 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' "${conf...@]}" | sort -u ) )
for i in "${tmp...@]//\"/}"; do
i=$( eval echo "$i" ) # expand ~
[ -r "$i" ] && kh=( "${...@]}" "$i" )
--
bash-completion
_______________________________________________
Bash-completion-commits mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/bash-completion-commits