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

History key bindings



I'm using zsh version 3.0.0, with the up and down cursor keys being bound
(at the moment) to history-beginning-search-backward and history-beginning-
search-forward.  These almost do what I want (i.e. they match on the start
of the line) except that they put the cursor at the start (or rather leave
it where it is) rather than putting it at the end of the line.

The equivalent tcsh functions (and 4DOS on MSDOS) match on wherever you are
when you first start the search but put the cursor at the end.

For instance, with history:

  vi fred
  chmod +x fred
  vi bill
  vi fred.c
  
typing 

  $vi f_

and searching backwards will find 'vi fred.c' and put the cursor at the end 
of the line, whereas under zsh it will put the cursor after 'f'.

Is there some way to cause zsh to remember the buffer up to where it was
when the search started and use that, while putting the cursor at the end 
still?  From the documentation it seems that up until version 3 something
like this was normal, and then the history-search-backward etc. was
changed to only match on the first word.

Apart from this one (annoying, to me) problem, zsh is wonderful.  If this is
fixed in the latest release or the beta version then I'll try that...

Thanks,
    Chris C



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