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

Re: Please fix history-search-backward/forward

On 29 August 2010 00:23, Felipe Contreras <felipe.contreras@xxxxxxxxx> wrote:
> On Sat, Aug 28, 2010 at 11:55 PM, Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
>> On 28 August 2010 20:54, Felipe Contreras <felipe.contreras@xxxxxxxxx> wrote:
>>> zle says:
>>> Search backward in the history for a line beginning with the first
>>> word in the buffer.
>>> GNU readline says:
>>> Search backward through the history for the string of characters
>>> between the start of the current line and the point.
>>> [1] http://zsh.sourceforge.net/Doc/Release/User-Contributions.html
>> I think you want history-beginning-search-backward/forward ? Changing
>> the effects of a widget is (and I think I can say this quite safely)
>> is not really an option.
> I already mentioned history-beginning-search-backward/forward
> (history-search-end), the point is not how to do that.

history-beginning-search-backward and
history-beginning-search-backward-end are not the same. The one I
mentioned is builtin and doesn't need any autoloads.

> The point is that history-beginning-search-backward-end encompasses
> the functionality of history-search-backward, so why not make
> history-search-backward do the same as
> history-beginning-search-backward-end, if no functionality would be
> lost?

They behave differently so I'm not sure what you mean. Trying to
emulate history-search-backward behavior in
history-beginning-search-backward(-end) would involve lots of awkward
cursor movement to put it after the first word.

OTOH, if you want the default bindings for ^[p and ^[n to be changed,
I have no counter argument, but who even uses those keys for history
movement? AFAIK, no other keys are bound to these widgets by default.
(ran zsh -f and did a few alt-x where-is).

Mikael Magnusson

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