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

Re: <cntrl-r> with wild cards

On Thu, 10 Apr 2008 17:57:14 +0200
"Richard Hartmann" <richih.mailinglist@xxxxxxxxx> wrote:
> On Thu, Apr 10, 2008 at 10:45 AM, Peter Stephenson <pws@xxxxxxx> wrote:
> >  autoload -U history-pattern-search
> >  zle -N history-pattern-search-backward history-pattern-search
> >  bindkey '^xS' history-pattern-search-backward
> Is there any way to mate this with
> history-incremental-search-backward
> or otherwise make this search incremental?

Incremental search relies quite heavily on internal handling of
character input.  See incremental-complete-word for why it's not a whole
barrel of laughs trying to implement incremental commands as a function

When I did the original multibyte conversion, I stuck in a note in the
isearch code saying that it would be neater to convert to multibyte
strings rather than wide characters for searching.  I'm not sure now why
I didn't: history lines are stored as multibyte strings, so there's much
less overall convesion that way, but for some reason that now escapes me
(but could become horribly clear again) I thought it was difficult.
Once that's done, it's a relatively straightforward change to add
internal isearch widgets that do pattern searching (with 99% of the code
in common with the current isearch widgets).

Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/

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