I am new to zsh and I like it a lot, especially with oh-my-zsh plugin. I installed oh-my-zsh with its default values and can't figure out how to turn off autocompletion for specific commands, that I often use, such as:sudo mc or sudo gem update. The thing is that I have .mc directory and .gem directory and zsh proposes corresponding autocompletions (for .mc and .gem).Generally I would like to config zsh so that sudo is not considered a separate command (which it is not) with the following as a params. Is there a config for that?
How to disable autocompletion for sudo ...?
zsh;autocomplete;oh my zsh
Ignoring directory patterns is fairly painless. You can add the following to your ~/.zshrc.The first line ignores .mc and .gem patterns after issuing cd [TAB]. The next line ignores them after issuing sudo [TAB].zstyle ':completion:*:cd:*' ignored-patterns '(*/)#.mc' '(*/)#.gem'zstyle ':completion:*:sudo:*' ignored-patterns '(*/)#.mc' '(*/)#.gem'