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

Re: REC_EXACT and AUTO_MENU, and compctl -U too



Bart Schaefer wrote:
>What I'd like is to have recexact behavior when I type the entire prefix
>and automenu behavior when zsh supplies the prefix.

Interesting.  At the moment, zle makes absolutely no distinction
between text inserted by the user and text inserted by completion.
It also does not consider itself to be in the middle of a completion
immediately after completion inserts text (other than in menu completion).
I suppose an extra state flag, to disable REC_EXACT would be reasonable.
Set the flag when completion inserts text, and clear it when any other
editing action occurs.  Would this give the semantics you want?

>While I'm on the subject of mildly stupid completion behavior, automenu
>in conjunction with compctl -U could do with a bit of work.  It'd be a
>lot more useful if menu completion kicked in immediately when compctl -U
>returns multiple matches and automenu is set.  Otherwise you lose both
>the set of completions and the nonunique suffix as soon as the first TAB
>is pressed.

I see what you mean.  I think common prefix recognition should be
disabled when using a -U compctl.  The effect of -U is to disable the
use of existing prefixes, so trying to take advantage of the usual prefix
semantics under such circumstances is pretty stupid.

>                                         Any remarks on how difficult they
>are to pull off?

Neither of them seems particularly difficult to implement, but they
won't exactly make zle_tricky any less _tricky.  Testing will be tedious.

-zefram



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