Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: ignored-patterns: only ignore commands, not files



On 1/14/21, Fourhundred Thecat <400thecat@xxxxxx> wrote:
> Hello,
>
> I have this in my .zshrc:
>
>   zstyle ':completion:*' ignored-patterns 'foo'
>
> the goal is to ignore command "foo" when autocomleting. But this also
> ignores argument foo, (ie file is named foo, as in "ls foo")
>
> is it possible to ignore foo only when it is used as command, and not
> when it is used as argument (after another command) ?
>
> thanks,

Be more specific,
zstyle ':completion:*:-command-:*' ignored-patterns foo
(see the output of the _complete_help widget, bound to ctrl-x h by
default (note that it's not ctrl-x ctrl-h)).

-- 
Mikael Magnusson




Messages sorted by: Reverse Date, Date, Thread, Author