zsh-users
 help / color / mirror / Atom feed
* ignored-patterns: only ignore commands, not files
@ 2021-01-14  6:31 Fourhundred Thecat
  2021-01-14 14:04 ` Mikael Magnusson
  0 siblings, 1 reply; 3+ messages in thread
From: Fourhundred Thecat @ 2021-01-14  6:31 UTC (permalink / raw)
  To: zsh-users

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,


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ignored-patterns: only ignore commands, not files
  2021-01-14  6:31 ignored-patterns: only ignore commands, not files Fourhundred Thecat
@ 2021-01-14 14:04 ` Mikael Magnusson
  2021-01-15  4:38   ` Fourhundred Thecat
  0 siblings, 1 reply; 3+ messages in thread
From: Mikael Magnusson @ 2021-01-14 14:04 UTC (permalink / raw)
  To: Fourhundred Thecat; +Cc: zsh-users

On 1/14/21, Fourhundred Thecat <400thecat@gmx.ch> 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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ignored-patterns: only ignore commands, not files
  2021-01-14 14:04 ` Mikael Magnusson
@ 2021-01-15  4:38   ` Fourhundred Thecat
  0 siblings, 0 replies; 3+ messages in thread
From: Fourhundred Thecat @ 2021-01-15  4:38 UTC (permalink / raw)
  To: zsh-users

 > On 2021-01-14 15:04, Mikael Magnusson wrote:
> On 1/14/21, Fourhundred Thecat <400thecat@gmx.ch> wrote:
>>
>> 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")
>
> 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)).

this works great!

thank you,



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-01-15  4:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-14  6:31 ignored-patterns: only ignore commands, not files Fourhundred Thecat
2021-01-14 14:04 ` Mikael Magnusson
2021-01-15  4:38   ` Fourhundred Thecat

zsh-users

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.vuxu.org/zsh-users

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 zsh-users zsh-users/ http://inbox.vuxu.org/zsh-users \
		zsh-users@zsh.org
	public-inbox-index zsh-users

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.zsh.users


code repositories for the project(s) associated with this inbox:

	https://git.vuxu.org/mirror/zsh/

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git