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

Re: History as in tcsh



Casper Gripenberg wrote:
> Mikael Magnusson wrote:
> > I think
> > bindkey '^[[A' up-line-or-search
> > is what you want. Although you may have to replace the ^[[A bit with
> > whatever your up arrow key sends to the terminal.
> 
> This doesn't quite work as expected. At least if you're used
> to the tcsh model. It only searches for the first word on the
> line.

There's a function "up-line-or-beginning-search" distributed with the
shell, so

autoload -U up-line-or-beginning-search
zle -N up-line-or-beginning-search
bindkey '\e[A' up-line-or-beginning-search

is supposed to search for the entire prefix.  See the zshcontrib manual.

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070



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