Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
RE: more interactive menu completion
- X-seq: zsh-users 5768
- From: Borzenkov Andrey <Andrey.Borzenkov@xxxxxxxxxxx>
- To: "'Le Wang'" <lewang@xxxxxxxxx>, "'Zsh users list'" <zsh-users@xxxxxxxxxx>
- Subject: RE: more interactive menu completion
- Date: Mon, 20 Jan 2003 15:17:22 +0300
- Importance: Normal
- In-reply-to: <20030119233436.51078.qmail@xxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
>
> I'm using menu completion now, and I absolutely love
> it. However I was just thinking that all of my
> keyboard keys are unmapped during menu completion, so
> wouldn't it be nice if I could press 'abc', and have
> the selection go to the first file starting with an
> 'abc'? This is very much like the way modern file
> managers work (e.g. Explorer, Konqueror, etc), except
> they only match the first letter.
>
> It would be great if this kind of widget can be
> refined to do substring matching as well. Does this
> kind of completion scheme currently exist for Zsh?
>
There is incremental-complete-word widget that does what you want. I do not
know if it is widely used, so your comments would be welcome.
incremental-complete-word
This allows incremental completion of a word. After starting this
command, a list of completion choices can be shown after every
character you type, which you can delete with ^H or DEL. Pressing
return accepts the completion so far and returns you to normal
editing (that is, the command line is _not_ immediately executed).
You can hit TAB to do normal completion, ^G to abort back to the
state when you started, and ^D to list the matches.
This works only with the new function based completion system.
bindkey '^Xi' incremental-complete-word
You'll need
fpath=($fpath /path/to/zsh/functions/Zle)
autoload incremental-complete-word
(unless done already).
It did not work for me after quick test :(
-andrey
Messages sorted by:
Reverse Date,
Date,
Thread,
Author