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

Re: command completion taking ages



Oliver Kiddle wrote:

> If I press tab in a position where all commands are completed, I get a
> very long delay. This is quite annoying even though I can interrupt it
> with Ctrl-C. Is there a way using the zstyle, tags and _wanted stuff
> that I could indicate with zstyle that I don't want to complete commands
> if $#PREFIX = 0. I couldn't see any styles which are passed through eval
> in any of _requested, _wanted, _tags etc but other than using the
> high-level stuff for tag ordering, I don't fully understand the tag
> selection stuff so I may well have missed something.

No, we don't have something like that. I don't remember exactly when
it was, but I have been thinking about something like that too...

Maybe some style tested by _setup or _tags saying if a certain tag
should only be used under certain circumstances. Either using the
approach we (well, I, and it wasn't my best idea either) used for
_match, i.e. the value of the style is math-eval'ed and if non-zero,
the tag is used. Or -- probably better, and we should then think about
using it for _match, too -- the value is just eval'ed and if it has a
zero return status (or the style is not set), the tag is used.

(Hm, now that I think of it... it's quite easy, why haven't I...)

Any other opinions?


Back to your question: currently you can only 1) use tag-order to make 
it generate as few matches as possible, or 2) (probably better) copy
and modify _command_names to test [[ -z $PREFIX] (or (( $#PREFIX )) if 
you prefer).


Bye
 Sven


--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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