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

Re: PATCH: even better history-search-{for,back}ward for 3.1.4



"Bart Schaefer" writes:
> That means that a line consisting of exactly one word, say "ls", does
> not match a search for `a line beginning with the first word of "ls -l"'.

This is as it should be.  If someone searches for "ls ", he doesn't
want to see just "ls".  In fact, even if you're searching for the
prefix "ls" (w/o space), the code skips a line of just "ls" as
a useless match (the only exception to that is that it will allow
the match if we are returning to the "curhist" line at the end of
the history).

> It also means that a line beginning with "ls	" (tab) won't match.

Yes.  It would be nice to fix this, but this is almost never a
problem in actual practice since most people don't input tabs into
their command lines.  Your suggestion for adding a word-boundary
option to metadiffer() sounds like the right solution.

..wayne..



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