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

Re: up-line-or-search still 'fixed'!



On Jun 10, 12:57pm, Bruce Stephens wrote:
} Subject: Re: up-line-or-search still 'fixed'!
}
} Zefram <zefram@xxxxxxxxx> writes:
} 
} > Bruce Stephens wrote:
} > >Another one---which I think I'd find acceptable---would be not to move
} > >the cursor, so history-search-backward would always search for the
} > >text before the cursor.  Or has that been tried, and people hated it?
} > 
} > That's exactly what history-beginning-search-* do.
} 
} Doh.  And it's even what M-p, M-n are bound to.  So is the problem
} that people really like(d) the behaviour of going to the end of the
} line?

No; I explained what the problems are:

(1) history-search-*ward now match only complete words; they used to
    match prefixes of words too.
(2) history-beginning-search-*ward match across word boundaries; the
    desired behavior is to stop matching at the first word boundary
    (or before, see (1)).
(3) *-line-or-search, what we really want to use, are affected by the
    implementation of history-search-*ward.

The thing with the cursor moving to the end of the line is simply there
to "look like emacs".  (In emacs shell mode, if you hit return with the
cursor in the middle of the line, it acts like zsh's accept-and-hold, but
if you hit return at the end of the line it acts like accept-line.  So
history searches in emacs always place the cursor at end of the line, and
Paul F. made zsh act the same.)

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com



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