diff options
author | Toon Claes <toon@tonotdo.com> | 2009-11-09 21:28:17 +0100 |
---|---|---|
committer | Toon Claes <toon@tonotdo.com> | 2009-11-09 21:28:17 +0100 |
commit | 729fd0ab3cae9636ea8d40b76b80a0763c9150da (patch) | |
tree | dfc48d9f58e5448f7efda657f7d85cdbf5c15cc9 /lib/completion.zsh | |
parent | bbef2db92b39c41705e0a3f05da525b5b1eb8901 (diff) | |
parent | c620408962dd93fe920414eedd8e8e38b241eb08 (diff) | |
download | zsh-729fd0ab3cae9636ea8d40b76b80a0763c9150da.tar.gz zsh-729fd0ab3cae9636ea8d40b76b80a0763c9150da.tar.bz2 zsh-729fd0ab3cae9636ea8d40b76b80a0763c9150da.zip |
Merge branch 'master' of git://github.com/robbyrussell/oh-my-zsh
Diffstat (limited to 'lib/completion.zsh')
-rw-r--r-- | lib/completion.zsh | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/completion.zsh b/lib/completion.zsh index deeb52824..c231ee21e 100644 --- a/lib/completion.zsh +++ b/lib/completion.zsh @@ -22,7 +22,7 @@ else fi zstyle ':completion:*' list-colors '' -zstyle ':completion:*' hosts $( sed 's/[, ].*$//' $HOME/.ssh/known_hosts ) + unsetopt MENU_COMPLETE #setopt AUTO_MENU @@ -35,7 +35,12 @@ zstyle ':completion:*:*:*:*:*' menu yes select zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;34=0=01' zstyle ':completion:*:*:*:*:processes' command "ps -u `whoami` -o pid,user,comm -w -w" -zstyle ':completion:*:*:(ssh|scp):*:*' hosts `sed 's/^\([^ ,]*\).*$/\1/' ~/.ssh/known_hosts` + +# Load known hosts file for auto-completion with ssh and scp commands +if [ -f ~/.ssh/known_hosts ]; then + zstyle ':completion:*' hosts $( sed 's/[, ].*$//' $HOME/.ssh/known_hosts ) + zstyle ':completion:*:*:(ssh|scp):*:*' hosts `sed 's/^\([^ ,]*\).*$/\1/' ~/.ssh/known_hosts` +fi # Complete on history # zstyle ':completion:*:history-words' stop yes |