Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: <cntrl-r> with wild cards
- X-seq: zsh-users 12778
- From: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- To: "Zsh Users" <zsh-users@xxxxxxxxxx>
- Subject: Re: <cntrl-r> with wild cards
- Date: Thu, 10 Apr 2008 20:49:45 +0100
- In-reply-to: <2d460de70804100857q2515235ck70d2062a54a12a66@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20080409205827.GA21630@xxxxxxxxxxxx> <200804100845.m3A8jDUG003430@xxxxxxxxxxxxxx> <2d460de70804100857q2515235ck70d2062a54a12a66@xxxxxxxxxxxxxx>
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
widget.
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