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

Re: history-search-backward



Le 2010-06-09, Leander Jedamus <ljedamus@xxxxxxxxxxxxxx> a Ãcrit :
> Hi!
> 
> On my ubuntu system I had to insert these lines into /etc/zsh/zshrc:
> [[ -z "$terminfo[kpp]" ]] || bindkey -M emacs "$terminfo[kpp]" 
> history-search-backward
> [[ -z "$terminfo[knp]" ]] || bindkey -M emacs "$terminfo[knp]" 
> history-search-forward
> 
> Now my question is, how can history-search be configured?
> When I hit "sudo mount<PageUp>" the "mount"-part is ignored in the 
> search, all "sudo" are shown one at a time.
> How can I change this?

You could use history-beginning-search-backward instead of
history-search-backward. It will search using the text from the beginning of
the line to the cursor.
See http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html#SEC130

Regards
--
FranÃois Gannaz



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