_known_hosts_real: Pre-expand \t instead of relying on sed supporting it (Alioth: #314393).
This commit is contained in:
parent
3ac523f57e
commit
50ae579273
@ -1552,7 +1552,7 @@ _known_hosts_real()
|
||||
|
||||
# append any available aliases from config files
|
||||
if [[ ${#config[@]} -gt 0 && -n "$aliases" ]]; then
|
||||
local hosts=$( sed -ne 's/^[ \t]*[Hh][Oo][Ss][Tt]\([Nn][Aa][Mm][Ee]\)\{0,1\}['"$'\t '"']\{1,\}\([^#*?]*\)\(#.*\)\{0,1\}$/\2/p' "${config[@]}" )
|
||||
local hosts=$( sed -ne 's/^['"$'\t '"']*[Hh][Oo][Ss][Tt]\([Nn][Aa][Mm][Ee]\)\{0,1\}['"$'\t '"']\{1,\}\([^#*?]*\)\(#.*\)\{0,1\}$/\2/p' "${config[@]}" )
|
||||
COMPREPLY+=( $( compgen -P "$prefix$user" \
|
||||
-S "$suffix" -W "$hosts" -- "$cur" ) )
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user