Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: history-incremental-search-backward with a twist
- X-seq: zsh-users 4291
- From: Hannu Koivisto <azure@xxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: history-incremental-search-backward with a twist
- Date: 29 Sep 2001 17:51:04 +0300
- In-reply-to: <1010929024149.ZM19026@xxxxxxxxxxxxxxxxxxxxxxx> (Bart Schaefer's message of "Sat, 29 Sep 2001 02:41:48 +0000")
- Mail-copies-to: nobody
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <87pu8b3tjx.fsf@xxxxxxxxxxxxxxxx> <1010929014105.ZM18918@xxxxxxxxxxxxxxxxxxxxxxx> <1010929024149.ZM19026@xxxxxxxxxxxxxxxxxxxxxxx>
- Sender: Hannu Koivisto <Hannu.Koivisto@xxxxxxxxxxx>
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> writes:
| On Sep 29, 1:41am, Bart Schaefer wrote:
| }
| } Presuming you have 4.0.x, this is ridiculously easy ...
I have 4.0.2, running on Debian GNU/Linux unstable x86; sorry I
forgot to mention this.
| function beginning-incremental-search {
| if [[ $LASTWIDGET == $WIDGET ]]
| then zle .$WIDGET
| else zle .$WIDGET $LBUFFER
| fi
| }
|
| zle -N history-incremental-search-backward beginning-incremental-search
| zle -N history-incremental-search-forward beginning-incremental-search
This doesn't seem to do what I want. Let's try again. If, after
evaluating that, I say:
dir bar foo
echo foo
dir^Rfoo
I see:
[my-prompt] dir
failing bck-i-search: dirfoo_
whereas I expected it to find "dir bar foo" history entry. That
is, your change seems to insert to the bck-i-search: -prompt, as if
I had written it, what I have on the command line at the moment I
invoke the search. In order to do what I want, such insertion
would work only if a) the search would be regexp search and b) it
inserted "^<what I have on the command line>.*" instead of just
"<what I have on the command line>".
| Which means you can't use the old history-incremental-search-* any more if
| you want this variant to work.
This is not a problem; I don't think I have any use for normal
history-incremental-search-* behaviour.
--
Hannu
Please don't send copies of list mail
Messages sorted by:
Reverse Date,
Date,
Thread,
Author