From: Ray Andrews <rayandrews@eastlink.ca>
To: zsh-users@zsh.org
Subject: Re: trivial problem with histverify
Date: Mon, 01 Dec 2014 16:10:17 -0800 [thread overview]
Message-ID: <547D0369.3060802@eastlink.ca> (raw)
In-Reply-To: <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.
next prev parent reply other threads:[~2014-12-02 0:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-01 20:20 Ray Andrews
2014-12-01 23:26 ` Mikael Magnusson
2014-12-02 0:10 ` Ray Andrews [this message]
2014-12-02 2:47 ` Bart Schaefer
2014-12-03 3:53 ` Ray Andrews
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=547D0369.3060802@eastlink.ca \
--to=rayandrews@eastlink.ca \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).