Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: ignored-patterns: only ignore commands, not files
- X-seq: zsh-users 26382
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Fourhundred Thecat <400thecat@xxxxxx>
- Cc: zsh-users@xxxxxxx
- Subject: Re: ignored-patterns: only ignore commands, not files
- Date: Thu, 14 Jan 2021 15:04:12 +0100
- Archived-at: <https://zsh.org/users/26382>
- Archived-at: <http://www.zsh.org/sympa/arcsearch_id/zsh-users/2021-01/CAHYJk3QBXdqp9LYLzSu%3DpMsKXKqgkQSSFhg0WRSs%3Dtjdn4_7gA%40mail.gmail.com>
- In-reply-to: <e9873add-7f2f-8051-73f5-db9a9568cbb8@gmx.ch>
- List-id: <zsh-users.zsh.org>
- References: <e9873add-7f2f-8051-73f5-db9a9568cbb8@gmx.ch>
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