[Bash-completion-commits] [SCM] bash-completion branch, master, updated. ea0ee6a46b1aa7fcd847dfe3a3c277e603d047c6
Ville Skyttä
ville.skytta at iki.fi
Sat Jan 16 13:41:16 UTC 2010
The following commit has been merged in the master branch:
commit 878c9dd5c9fa8cf195d1246d2611fc19d7604408
Author: Ville Skyttä <ville.skytta at iki.fi>
Date: Sat Jan 16 15:22:49 2010 +0200
Fix finding known hosts files from SSH configs on systems with non-GNU sed.
There's no alternation functionality ('\|' or '|') in POSIX BRE.
diff --git a/bash_completion b/bash_completion
index 1ac5bf4..dea0b19 100644
--- a/bash_completion
+++ b/bash_completion
@@ -1288,7 +1288,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' "${config[@]}" | sort -u ) )
+ tmpkh=( $( awk 'sub("^[[:space:]]*([Gg][Ll][Oo][Bb][Aa][Ll]|[Uu][Ss][Ee][Rr])[Kk][Nn][Oo][Ww][Nn][Hh][Oo][Ss][Tt][Ss][Ff][Ii][Ll][Ee][[:space:]]+", "") { print $0 }' "${config[@]}" | sort -u ) )
for i in "${tmpkh[@]}"; do
# Remove possible quotes
i=${i//\"}
--
bash-completion
More information about the Bash-completion-commits
mailing list