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

Re: incremental history search



On Sat, 21 Feb 2004 16:50:48 +0100, Thorsten Kampe <thorsten@xxxxxxxxxxxxxxxx> wrote:

* Anthony Iano-Fletcher (2004-02-21 15:39 +0100)
history-beginning-search-backward and history-beginning-search-forward
were designed to repeatedly match whatever was to the left of the cursor
with one's history. The cursor shouldn't move or else a repeated match
would not be looking for the original prefix.

I know that, thanks. I was referring to the *special case where I
haven't typed anything and the command line is empty* and there is
*nothing to search for*.

If I just want to move up or down sequentially I use C-p and C-n. I guess you need emacs bindings on for this (bindkey -me). These commands do position the cursor at the end of the line.

In this case "up-line-or-search" does simply
a "up-line" and moves the cursor to the end of any recalled command
line from history. "history-beginning-search-backward" does a
"up-line", too, in this case, but leaves the cursor where it was (at
the beginning of each recalled command line from history).

Both approaches are useful in certain cases but in my opinion the
dynamic movement to the end of the line is more useful because I
manipulate the end of commands more often than the beginning.

Thorsten





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