new repository without sensitive information
This commit is contained in:
commit
57fa0afede
51 changed files with 1883 additions and 0 deletions
12
modules/ssh/init
Normal file
12
modules/ssh/init
Normal file
|
@ -0,0 +1,12 @@
|
|||
#!/bin/zsh
|
||||
h=()
|
||||
if [[ -r ~/.ssh/config ]]; then
|
||||
h=($h ${${${(@M)${(f)"$(cat ~/.ssh/config)"}:#Host *}#Host }:#*[*?]*})
|
||||
fi
|
||||
if [[ -r ~/.ssh/known_hosts ]]; then
|
||||
h=($h ${${${(f)"$(cat ~/.ssh/known_hosts{,2} || true)"}%%\ *}%%,*}) 2>/dev/null
|
||||
fi
|
||||
if [[ $#h -gt 0 ]]; then
|
||||
zstyle ':completion:*:ssh:*' hosts $h
|
||||
zstyle ':completion:*:slogin:*' hosts $h
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue