diff options
author | Frank Terbeck <ft@bewatermyfriend.org> | 2011-02-11 15:59:00 +0100 |
---|---|---|
committer | Frank Terbeck <ft@bewatermyfriend.org> | 2011-03-02 18:55:24 +0100 |
commit | 78ab02ffa00d1f1a149bed755b72ff0bf0ff4bbb (patch) | |
tree | 31d7e3bb3889bad86641781ea4c80bdbed8d7cb6 /debian/examples/ssh_completion2 | |
parent | f6cff33fb722533567992b4152f5072f770e8b93 (diff) | |
download | zsh-78ab02ffa00d1f1a149bed755b72ff0bf0ff4bbb.tar.gz zsh-78ab02ffa00d1f1a149bed755b72ff0bf0ff4bbb.zip |
Initial `debian/' import
Diffstat (limited to 'debian/examples/ssh_completion2')
-rw-r--r-- | debian/examples/ssh_completion2 | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/debian/examples/ssh_completion2 b/debian/examples/ssh_completion2 new file mode 100644 index 000000000..7c6fcb20e --- /dev/null +++ b/debian/examples/ssh_completion2 @@ -0,0 +1,37 @@ +NOTE: In order for this to work with newer versions of ssh, you must +insure that "HashKnownHosts" is set to "no". + +This is what I would call overkill, but it should help illustrate +what some people like to do with ssh completion. +---------- + +zstyle ':completion:*' format 'Completing %d' +zstyle ':completion:*' group-name '' + +zstyle ':completion:*:scp:*' tag-order \ + 'hosts:-host hosts:-domain:domain hosts:-ipaddr:IP\ address *' +zstyle ':completion:*:scp:*' group-order \ + users files all-files hosts-domain hosts-host hosts-ipaddr +zstyle ':completion:*:ssh:*' tag-order \ + users 'hosts:-host hosts:-domain:domain hosts:-ipaddr:IP\ address *' +zstyle ':completion:*:ssh:*' group-order \ + hosts-domain hosts-host users hosts-ipaddr + +zstyle ':completion:*:(ssh|scp):*:hosts-host' ignored-patterns \ + '*.*' loopback localhost +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/hosts(|)(N) <<(ypcat hosts 2>/dev/null))"}%%\#*} + )' + +zstyle ':completion:*:(ssh|scp):*:my-accounts' users-hosts \ + my.secret.account@student.uu.se + |