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

Re: ignore classes of files for completion on a per directory basis?



On Wed, 9 Jul 2008 16:58:36 -0700
"sam reckoner" <sam.reckoner@xxxxxxxxx> wrote:
> I would like to setup completion to ignore a certain group of files
> (say, those with an underscore in the file names) when I am trying to
> complete when in a specific directory. What makes this tricky is that
> I may not want those same filenames (those with underscores in them)
> in a neighboring subdirectory to be ignored for completion.

You want something along the lines of:

zstyle -e ':completion:*files' ignored-patterns \
  '[[ $PWD = */Src ]] && reply=("*_*")'

-- 
Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/



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