Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: trivial problem with histverify
- X-seq: zsh-users 19476
- From: Ray Andrews <rayandrews@xxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: trivial problem with histverify
- Date: Mon, 01 Dec 2014 16:10:17 -0800
- In-reply-to: <CAHYJk3Q=oOaBrOoT_cmfrC=jS9f0VDPV2UDofiy9mcw=L2gxRA@mail.gmail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <547CCD76.2020806@eastlink.ca> <CAHYJk3Q=oOaBrOoT_cmfrC=jS9f0VDPV2UDofiy9mcw=L2gxRA@mail.gmail.com>
On 12/01/2014 03:26 PM, Mikael Magnusson wrote:
If histverify is set or not doesn't change the fact that !! in your
command will expand as normal. If you want to suppress history
expansion you either have to disable the banghist option, or quote the
history character (!). Long story short is: '[[:digit:]] !!' will do
what you want (double quotes do not stop history expansion).
There's no issue with expansion, I want it to expand just as it does.
Here's the binding:
bindkey -s "\e[5~" '\C-a print -s \C-e\C-m history 1 | grep
--color=auto "[[:digit:]] !!" \C-m'
... with 'histverify' off, it executes directly, on whatever text is on
the command line, but with the variable on, I must press ENTER before it
fires. I'm guessing that the code that handles 'histverify' sees the "
!! " and so demands the ENTER, but I'd say that in this situation that
shouldn't be required since no history command is actually being
executed, it's just a listing of string matches. Or if it's agreed that
that should indeed require the ENTER (when 'histverify' is active), I'm
wondering if there's a workaround, so that my binding is exempt. (BTW
the " [[digit:]] " is just to keep the search to the beginning of
history lines, after the number.) BTBTW it seems a strange way to
capture whatever is on the command line but " print -s " was all that I
could find that worked at the time.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author