cleaned ssh completion
This commit is contained in:
parent
a799a023fb
commit
ef40eff491
6
.zshrc
6
.zshrc
@ -92,6 +92,10 @@ zstyle ':completion:*' squeeze-slashes true
|
|||||||
zstyle ':completion::*:kill:*:*' command 'ps xf -U $USER -o pid,%cpu,cmd'
|
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::*: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"
|
zstyle :compinstall filename "$HOME/.zshrc"
|
||||||
|
|
||||||
# Always do mid-word tab completion
|
# Always do mid-word tab completion
|
||||||
@ -470,6 +474,8 @@ sshc() {
|
|||||||
ssh -q -o "ControlPath=/tmp/.cm-%r@%h:%p" -O stop $1
|
ssh -q -o "ControlPath=/tmp/.cm-%r@%h:%p" -O stop $1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
compdef '_dispatch ssh ssh' sshc
|
||||||
|
|
||||||
#---------------------------------- Miscellaneous ----------------------------
|
#---------------------------------- Miscellaneous ----------------------------
|
||||||
|
|
||||||
setopt extended_glob
|
setopt extended_glob
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user