Zsh Mailing List Archive
Messages sorted by:
Re: up-line-or-search question
- X-seq: zsh-workers 16912
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: up-line-or-search question
- Date: Wed, 27 Mar 2002 12:59:31 +0000
- Cc: zsh-workers@xxxxxxxxxx
- In-reply-to: <Pine.LNX.4.44.0203261140300.13204-100000@xxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20020326192340.GA12802@xxxxxxxxxx> <Pine.LNX.4.44.0203261140300.13204-100000@xxxxxxxxxxxxxxxx>
- Sender: Oliver Kiddle <kiddleo@xxxxxxxxxx>
On Tue, Mar 26, 2002 at 11:51:01AM -0800, Bart Schaefer wrote:
> I'd rather have it feep at the end of the history. Moving down a line
> when the search fails means I lose my context and have to re-establish
> it before I can e.g. reverse the direction of the search.
In the case of this function, re-establishing the context is
merely a case of pressing the up cursor which I don't think is
that much of a problem.
I did get it slightly wrong in the last function though
because if the h-b-s-f fails and the subsequent d-l-o-h does a
down history instead of down line, it is not good. So it
[[ $RBUFFER = *$'\n'* ]] || return
before the fi.
> Don't test [[ $LASTWIDGET = $__searching ]], test [[ -n $__searching ]].
> And name the cursor-saving variable something less generic, there may be
> other functions that want to save and restore the cursor ...
That doesn't help. It also means that the cursor position for
searches is then fixed forever after for that shell instance.
I think I've got it working now but am not sure why or whether
there was something peculiar with the history list I had
yesterday. Do we want to include the cursor movement in
the examples in the distribution - it is more like up-line-or-
search? Perhaps we need to use styles to configure it?
> I'm not sure what you mean. If you mean supply args at the time that you
I meant at the time when the key binding is created. That answers
my question, thanks.
This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
Messages sorted by: