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

Re: Globbing question



Oliver Kiddle wrote:
> Peter wrote:
> > The answer to both this and the next question is that unfortunately you
> > can't use glob qualifiers in ignored patterns.  They are handled as
> > generic patterns, not specifically file patterns.  This is rather a
> > nuisance.
> 
> I wouldn't say it is a nuisance. You can use the file-patterns style
> instead to add glob qualifiers where _files is used for completing
> files.

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

  zstyle ':completion:*:complete:-command-::commands' file-patterns '*(#q-*)'

doesn't work because it goes through the code the wrong way?  I would
say that *is* an annoyance, and that 99% of users don't care about
the difference between _files and _path_files.

Some cross-referencing between ignored-patterns and file-patterns might
be beneficial, too.

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.

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 692070


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************



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