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

Re: "rehash" each time a new program is installed?



On Fri, Feb 16, 2001 at 09:06:11AM +0100, Sven Wischnowsky wrote:
> 
> > } Oh, and a last one ;) Is it possible to "fignore" a file except when
> > } it's the only completion candidate (considering the typed string e.g.)?
> > 
> > That should happen already:
> > 
> > fignore <S> <Z> (FIGNORE <S>)
> >      An array (colon separated list) containing the suffixes of files
> >      to be ignored during filename completion.  However, if the
> >      completion generates only files which would match if this variable
> >      would be ignored, than these files are completed anyway.
> 
> The fact that it doesn't work out of the box might mean that he's
> using the new completion system. In that case he needs to use the
> _ignored completer, as in:
> 
>   zstyle ':completion:*' completer _complete _ignored

Great, that works!

> 
> And if he's using the new completion system, this:
> 
> > } Also, how could I have zsh not list "CVS" directories when completing
> > } paths? I tried fignore but it doesn't work.
> > 
> > I don't immediately recall any way to ignore intermediate directories in
> > a path.  It's probably possible using styles in 3.1.6 and later, but the
> > only way for 3.0.8 would be to write a "compctl -K" function and attach
> > it to the specific commands for which you don't want to see CVS.
> 
> can be solved, too. One only needs to not set $fignore, but instead
> use the ignored-patterns style, like so:
> 
>   zstyle ':completion:*:complete:*:(all-|)files' \
>       '?*~' '?*.(o|log|aux|...)' '(|*/)CVS'
>                  ^^^^^^^^^^^^^
>                     whatever suffixes one wants to have ignored
> 
> And finally: the _ignored completer can also be customized, see the
> manual/info or Peter's guide (from www.zsh.org).

I'll look it up, thank you Sven!

-- 
    OENONE: Songez-vous qu'en naissant mes bras vous ont reçue ?
            Mon pays, mes enfants, pour vous j'ai tout quitté.
                                          (Phèdre, J-B Racine, acte 1, scène 3)



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