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

RE: more interactive menu completion



> 
> 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