I find zsh's result lists for Tab completion quite useful, however I'd like to tweak their behaviour a bit:
They should appear when I Tab for the first time and afterwards dynamically update with every new letter added. The default behaviour is that the suggestions are only re-evaluated when you Tab again, I want to save this repeated keypress. (Update: But only list the possible completions, it shouldn't automatically modify my actual prompt line even if there is only one option left.)
Is there any way to achieve such behaviour?
Best Answer
One way which might offer the solution you want, is
incremental-complete-word
:This loads the funtion and binds it to Ctrl-X i. Now you can try it:
In this example the letter
k
was typed, followed by Control-X i.I typed
il
and now there was one possible completion (kill
). One could accept that and press enter.By typing Ctrl-D the zsh shows possible completions.
From
zshcontrib(1)
: