How can I ignore / remove / exclude autocompletions in zsh?

I usually use rs+[tab] to get rsync but it’s showing three options (on a new system):

➜  $ rs
     rsh       rsync     rsyslogd

I seldom use rsh or rsyslogd – how can I prevent these from appearing as matches in the autocompletion list in zsh?

Asked By: cwd


If you don’t want rsh and rsyslog to be ever completed in any situation just add the following into .zshrc:

zstyle ':completion:*' ignored-patterns 'rsh|rsyslog'
Answered By: jimmij
Categories: Answers Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.