diff --git a/bash_completion b/bash_completion index 1ac5bf41..dea0b191 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//\"}