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:
parent
fe2cb6b9f5
commit
221c421f92
1 changed files with 4 additions and 0 deletions
|
@ -92,3 +92,7 @@ zstyle ':completion:*:history-words' menu yes
|
||||||
# ignore multiple entries.
|
# ignore multiple entries.
|
||||||
zstyle ':completion:*:(rm|kill|diff):*' ignore-line other
|
zstyle ':completion:*:(rm|kill|diff):*' ignore-line other
|
||||||
zstyle ':completion:*:rm:*' file-patterns '*:all-files'
|
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=()'
|
||||||
|
|
Loading…
Reference in a new issue