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

Re: How to enable history completion in command line?



On Jan 2,  6:44am, Han Pingtian wrote:
}
} How can I enable history completion in the command line? That's typing
} a command then hit some key to let zsh completes the whole command 
} line based on history.

Are you sure you're not looking for history-beginning-search-backward?

Completion is extremely word-oriented, so using it to retrieve anything
that has whitespace and other syntactic separators is difficult.  There
are tricks you can do with "compadd -Q -U" to cause multi-word strings
to be inserted onto the command line, but attempting to do any sort of
menu completion (with limited exceptions for menu selection) will fail
because completion will begin to limit itself to the single word nearest
the cursor as soon as the first replacement is done.



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