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

Re: Autocompletion ala windows-esque



Benjamin Korvemaker (benjamin@xxxxxxxxxxxxxx) wrote:
> Forgive me now for this horrible thought.
> 
> I'm at that point in my life where I need a shell that fills in the
> completion automagically and changes it as necessary the more I type
> (just like that horrible feature that MS products tend to have). I'm
> crazy, I admit it. To make life easier in the future, I'm planning on
> putting potential completions into a list or array (of the zsh variety).
> 
> Before I begin the nastiness, has someone already done this?

If I understand you correctly, then yes, there's a function called
incremental-complete-word, which has this near its start:

  # 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.  RET will accept the
  # completion so far.  You can hit TAB to do normal completion, ^g to
  # abort back to the state when you started, and ^d to list the matches.

although it has a few things which I think could be improved upon
(this is next on my to-do list, in fact :-)

Presumably you'd want to tell it complete words from the history.  I
don't know when it first appeared, but you're best off using it with
the latest development versions: 3.1.6 and later.



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