1

How to append / extend zshell completions?

view story
linux-howto

http://unix.stackexchange.com – I am using zsh with oh-my-zsh. Unfortunately, oh-my-zsh does not use file ~/.ssh/config for hostname auto-completion (see Issue #1009, for instance). This could easily archived by the following code: [ -r ~/.ssh/config ] && _ssh_config=($(cat ~/.ssh/config | sed -ne 's/Host[=\t ]//p')) || _ssh_config=() zstyle ':completion:*:hosts' hosts $_ssh_config However, if I add the above commands to my ~/.zshrc file, all other sources for hostnames (like ~/.ssh/known_hosts), which are defined in file ~/.oh-my-zsh/lib/completion.zsh, are overridden. How can I append new completion rules for (HowTos)