File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed
test/fixtures/_known_hosts_real Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -1776,7 +1776,7 @@ _known_hosts_real()
1776
1776
# TODO(?): try to make known hosts files with more than one consecutive
1777
1777
# spaces in their name work (watch out for ~ expansion
1778
1778
# breakage! Alioth#311595)
1779
- tmpkh=($( awk ' sub("^[ \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]+", "") { print $0 }' " ${config[@]} " | sort -u) )
1779
+ tmpkh=($( awk ' sub("^[ \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= ]+", "") { print $0 }' " ${config[@]} " | sort -u) )
1780
1780
IFS=$ifs
1781
1781
fi
1782
1782
if (( ${# tmpkh[@]} != 0 )) ; then
@@ -1860,7 +1860,7 @@ _known_hosts_real()
1860
1860
1861
1861
# append any available aliases from ssh config files
1862
1862
if [[ ${# config[@]} -gt 0 && -v aliases ]]; then
1863
- local -a hosts=($( command sed -ne ' s/^[[:blank:]]*[Hh][Oo][Ss][Tt][[:blank:]] \(.*\)$/\1/p' " ${config[@]} " ) )
1863
+ local -a hosts=($( command sed -ne ' s/^[[:blank:]]*[Hh][Oo][Ss][Tt][[:blank:]=]\{1,\} \(.*\)$/\1/p' " ${config[@]} " ) )
1864
1864
if (( ${# hosts[@]} != 0 )) ; then
1865
1865
COMPREPLY+=($( compgen -P " $prefix " \
1866
1866
-S " $suffix " -W ' ${hosts[@]%%[*?%]*}' -X ' \!*' -- " $cur " ) )
Original file line number Diff line number Diff line change 3
3
# Unindented
4
4
Host gee* jar?this-part-we-do-not-complete-at-least-yet
5
5
HostName %h.example.com
6
- # Indented
7
- Host hus%%eth0 !negated #not-a-comment
6
+ # Indented, with = separator
7
+ Host = hus%%eth0 !negated #not-a-comment
Original file line number Diff line number Diff line change 1
- # With quotes and tilde
2
- UserKnownHostsFile "~/_known_hosts_real/known_hosts2"
1
+ # With quotes and tilde, and =
2
+ UserKnownHostsFile = "~/_known_hosts_real/known_hosts2"
3
3
# Without quotes, with tilde, and another on the same line
4
4
UserKnownHostsFile ~/_known_hosts_real/known_hosts3 _known_hosts_real/known_hosts4
You can’t perform that action at this time.
0 commit comments