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

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



this doesn't seem to work for functions like

function v () { gvim $* &}

Also, how do you make this completion  apply only to particular
functions? in other words, I would like attempting to complete on
certain functions to trigger the ignore class you have  setup.

Otherwise, it works great!

Thanks again.

On Thu, Jul 10, 2008 at 12:10 PM,  <zsh-users-digest-help@xxxxxxxxxx> wrote:

>
> ---------- Forwarded message ----------
> From: "sam reckoner" <sam.reckoner@xxxxxxxxx>
> To: zsh-users@xxxxxxxxxx
> Date: Wed, 9 Jul 2008 16:58:36 -0700
> Subject: ignore classes of files for completion on a per directory basis?
> 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.
>
> I know it's possible to configure completion to ignore a pattern of
> filenames globally, but how about on a per-directory basis?
>
> thanks in advance.
>
>
> ---------- Forwarded message ----------
> From: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
> To: zsh-users@xxxxxxxxxx
> Date: Thu, 10 Jul 2008 20:09:56 +0100
> Subject: 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