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

Re: PATCH: all completions



Bart Schaefer wrote:

> On Oct 12, 10:44am, Sven Wischnowsky wrote:
> } 
> } Bart Schaefer wrote:
> } 
> } > What about _ignored?
> } 
> } Ah, right, this does. Hm, but when I think about this alternate-set
> } stuff it comes from: doesn't it may make sense to add all the ignored
> } matches? At least than all corrections.
> 
> It may make sense to add all the ignored matches, but not in the same
> single completion where one adds all the not-ignored matches.  Is there
> some way to get all the ignored matches added only if there aren't any
> that are not ignored? 

That's the normal behaviour of _ignored. Without it one never gets the 
ignored matches. With it one either gets the not-ignored matches (x)or,
if there are none, only the ignored ones.
And _all_matches only adds the special all-matches-match at the end,
so it represents only all not-ignored matches or all ignored ones.

> Can one use _all_matches more than once in the
> list of completers, e.g. both before and after _ignored?

Since _all_matches only registers a function that is executed at the
end[*], it can't be called more than once (well, it can, but that will
result in the same behaviour).


[*] In the non-`old-matches' mode. With old-matches it just sets
compstate[old_list]=keep and compstate[insert]=all and returns zero.

Bye
 Sven


--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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