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

Re: SUGGESTION: Simplify auto-completion, a little

Bart Schaefer wrote:
> On Feb 15,  9:45pm, mail@xxxxxx wrote:
> }
> } Now:    git co<tab>m<tab>
> } Future: git co<tab>m
> } Result: git commit
> } 
> } It would be sufficient just hitting the symbol `m' to auto-complete to
> } `git commit`.
> Ordinary keybindings don't work that way; the "m" key is bound to the
> self-insert widget and does not re-enter completion.  You should seek
> out one of the various options for enabling "predictive typing", or
> you should try setting up menu-selection (so that the first tab would
> take you into a different keymap where "m" would select from among
> the possible choices).

Hmm... I'm not sure how easy it is to do that at the moment.  There is a
keymap for menu-selection, but I think it's only got a limited set of
functions to do with the menu --- I don't think you can make a key
execute a widget that leaves completion with the command line as it is
*and* does normal (non-completion) ZLE stuff like self-insert and
re-enter completion, can you?

This implies a level of tweaking stuff within the completion function
environment it's not currently desiged to do.  It probably wouldn't be
beyond the wit of humankind to add an internal widget like
narrow-completion that could retrieve the list of completions and narrow
it down, but I bet it's still not trivial.

Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/

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