1
0
Fork 0
mirror of synced 2024-11-29 18:55:34 -05:00

Fix ssh completion for ~/.ssh/config

Ref: https://www.zsh.org/mla/users/2015/msg00467.html

and `which _ssh_hosts`

Fixes #46
This commit is contained in:
Matt Hamilton 2018-09-17 01:28:26 -04:00
parent fe2cb6b9f5
commit 221c421f92

View file

@ -92,3 +92,7 @@ zstyle ':completion:*:history-words' menu yes
# ignore multiple entries.
zstyle ':completion:*:(rm|kill|diff):*' ignore-line other
zstyle ':completion:*:rm:*' file-patterns '*:all-files'
# fix ssh not completing with hosts from ~/.ssh/config
zstyle -e ':completion:*:*:ssh:*:my-accounts' users-hosts \
'[[ -f ~/.ssh/config && $key = hosts ]] && key=my_hosts reply=()'