If you use `ssh` a lot with `zsh` and have a lot of entries in your hostsfile (`/etc/hosts`) you might find it convenient to disable completion from these hosts by using:
zstyle ‘:completion:*’ hosts off
However, this may give you adverse affects, and your hostnames may stop auto-completing with `rsync` – in order to fix this try also adding this in to your `.zshrc`
zstyle -s ‘:completion:*:hosts’ hosts _ssh_config
[[ -r ~/.ssh/config ]] && _ssh_config+=($(cat ~/.ssh/config | sed -ne ‘s/Host[=\t ]//p’))
zstyle ‘:completion:*:hosts’ hosts $_ssh_config
If you also use `oh-my-zsh` and are still having trouble, trying adding those lines **after** this line:
source $ZSH/oh-my-zsh.sh
One Response to zshell: rsync hostname completion with zsh