cleaned ssh completion

This commit is contained in:
Paweł Płazieński 2016-01-04 12:20:21 +01:00
parent a799a023fb
commit ef40eff491

6
.zshrc
View File

@ -92,6 +92,10 @@ zstyle ':completion:*' squeeze-slashes true
zstyle ':completion::*:kill:*:*' command 'ps xf -U $USER -o pid,%cpu,cmd'
zstyle ':completion::*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;32'
zstyle ':completion:*:ssh:*' hosts ${${${(@M)${(f)"$(cat ~/.ssh/config)"}:#Host *}#Host }:#*[*?]*}
zstyle ':completion:*:slogin:*' hosts ${${${(@M)${(f)"$(cat ~/.ssh/config)"}:#Host *}#Host }:#*[*?]*}
zstyle ':completion:*:ssh:*' users # disables users completion
zstyle :compinstall filename "$HOME/.zshrc"
# Always do mid-word tab completion
@ -470,6 +474,8 @@ sshc() {
ssh -q -o "ControlPath=/tmp/.cm-%r@%h:%p" -O stop $1
}
compdef '_dispatch ssh ssh' sshc
#---------------------------------- Miscellaneous ----------------------------
setopt extended_glob