Zsh Mailing List Archive
Messages sorted by:
Re: Globbing question
- X-seq: zsh-users 8006
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Globbing question
- Date: Fri, 17 Sep 2004 12:31:16 +0200
- In-reply-to: <200409170945.i8H9jN1H023683@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <BD59728F-078D-11D9-8D39-000A95D2C79E@xxxxxxxxxxxxxxxx> <200409161430.i8GEUUoK012318@xxxxxxxxxxxxxx> <27415.1095348059@xxxxxxxxxxxxxxxxxxxxx> <200409170945.i8H9jN1H023683@xxxxxxxxxxxxxx>
> OK, so you're saying that in most contexts, you can do something like
> zstyle ':completion:*' file-patterns '*(#q-*)'
> to complete only executable files, but the specific example
That's right. (The #q isn't needed though.)
> zstyle ':completion:*:complete:-command-::commands' file-patterns '*(#q-*)'
> doesn't work because it goes through the code the wrong way? I would
Turns out that executables are added by using `compadd -k commands' so
it isn't filename based completion at all.
> say that *is* an annoyance, and that 99% of users don't care about
> the difference between _files and _path_files.
The only difference between _path_files and _files is that _files looks
up file-patterns. _path_files should only be used if there is a good
reason to disallow file-patterns.
Styles are there for adjusting things according to user preferences not
for fixing bugs in the underlying code. So the "annoyance" is not that
file-patterns or ignored-patterns can't handle this.
> Some cross-referencing between ignored-patterns and file-patterns might
> be beneficial, too.
Yes that's true.
> Presumably a side effect of using file-patterns is the _ignored
> completer doesn't pick up the remaining files, but if I remember there
> are ways of doing this with the all-files tag.
You can call the tag what you like. The value of file-patterns is a list
much like tag-order. It just happens that the default value includes an
all-files tag with the pattern *.
Messages sorted by: