mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-02 02:19:06 +01:00
Merge 42b5a1ddcd into 362927003b
This commit is contained in:
commit
0de0dd8040
1 changed files with 2 additions and 0 deletions
|
|
@ -35,10 +35,12 @@ cdpath=(.)
|
|||
[ -r /etc/ssh/ssh_known_hosts ] && _global_ssh_hosts=(${${${${(f)"$(</etc/ssh/ssh_known_hosts)"}:#[\|]*}%%\ *}%%,*}) || _ssh_hosts=()
|
||||
[ -r ~/.ssh/known_hosts ] && _ssh_hosts=(${${${${(f)"$(<$HOME/.ssh/known_hosts)"}:#[\|]*}%%\ *}%%,*}) || _ssh_hosts=()
|
||||
[ -r /etc/hosts ] && : ${(A)_etc_hosts:=${(s: :)${(ps:\t:)${${(f)~~"$(</etc/hosts)"}%%\#*}##[:blank:]#[^[:blank:]]#}}} || _etc_hosts=()
|
||||
[ -r ~/.ssh/config ] && _ssh_config_hosts=(${(s: :)${(ps:\t:)${(f)"$(<$HOME/.ssh/config|grep 'Host')"}#Host}#Hostname}) || _ssh_config_hosts=()
|
||||
hosts=(
|
||||
"$_global_ssh_hosts[@]"
|
||||
"$_ssh_hosts[@]"
|
||||
"$_etc_hosts[@]"
|
||||
"$_ssh_config_hosts[@]"
|
||||
"$HOST"
|
||||
localhost
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue