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

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



Wayne Davison wrote:

> On Thu, 15 Feb 2001, Bart Schaefer wrote:
> > On Feb 15,  6:57pm, Louis-David Mitterrand 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:
> 
> There's a problem with this in the new completion system (which I
> complained about quite a while ago).  Fignore works with the old
> completion code, but the new system will never complete a file name
> in the fignore list.  An example of doing both:
> 
>     % zsh -f
>     % fignore=( .bak )
>     % touch test1 test1.bak
>     % ls test1.<TAB>
> 
> This results in the expected test1.bak.  Now continue:
> 
>     % autoload -U compinit
>     % compinit
>     % zstyle ':completion:*' completer _expand _complete
>     % bindkey '\t' complete-word
>     % ls test1.<TAB>
> 
> It just beeps at you.  Using a wildcard will cause _expand to list the
> file, but _complete totally ignores it.  Is there an option that I'm
> missing?  I've tried using:
> 
>     % zstyle ':completion:*:all-files' ignored-patterns \*.bak
> 
> (instead of fignore) with the same results.

(Err, deja vu.  Didn't I answer a similar question last week?)

Anyway... you didn't include the _ignored completer in your list.
With that it will work.

If you don't set the completer style, the default will be used and
that is (_complete _ignored).


Thomas Koehler wrote:

> ...
> 
> % zsh -f
> picard% fignore=3D( .bak )
> picard% touch test1 test1.bak
> picard% autoload -U compinit
> picard% compinit
> picard% ls test1.<TAB>
>   -> leads to
>   picard% ls test1.bak
> 
> Ah, here's the problem: complete-word! expand-or-complete works fine!
> Why is this the case?

For me it works with both bindings. Old version?

Bye
 Sven


--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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