mirror of
https://github.com/Matir/skel.git
synced 2026-05-25 21:19:09 -07:00
Remove hashed SSH hosts from completion.
This commit is contained in:
@@ -10,8 +10,8 @@ zstyle ':completion:*:(ssh|scp):*:hosts-domain' ignored-patterns '<->.<->.<->.<-
|
||||
zstyle ':completion:*:(ssh|scp):*:hosts-ipaddr' ignored-patterns '^<->.<->.<->.<->' '127.0.0.<->'
|
||||
zstyle ':completion:*:(ssh|scp):*:users' ignored-patterns adm bin daemon halt lp named shutdown sync
|
||||
zstyle -e ':completion:*:(ssh|scp):*' hosts 'reply=(
|
||||
${=${${(f)"$(cat {/etc/ssh_,~/.ssh/known_}hosts(|2)(N) \
|
||||
/dev/null)"}%%[# ]*}//,/ }
|
||||
${=${${${(f)"$(cat {/etc/ssh_,~/.ssh/known_}hosts(|2)(N) \
|
||||
/dev/null)"}%%[# ]*}##\|*}//,/ }
|
||||
${=${(f)"$(cat /etc/hosts(|)(N) <<(ypcat hosts 2>/dev/null))"}%%\#*}
|
||||
${=${${${${(@M)${(f)"$(<~/.ssh/config)"}:#Host *}#Host }:#*\**}:#*\?*}}
|
||||
)'
|
||||
|
||||
Reference in New Issue
Block a user