zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.stephenson@samsung.com>
To: zsh-workers@zsh.org
Subject: Re: Inconsistent history expansion of characters adjacent to histchar
Date: Tue, 08 Oct 2013 16:43:13 +0100	[thread overview]
Message-ID: <20131008164313.23edae67@pwslap01u.europe.root.pri> (raw)
In-Reply-To: <20131008154404.4e7e3ef7@pwslap01u.europe.root.pri>

On Tue, 08 Oct 2013 15:44:04 +0100
Peter Stephenson <p.stephenson@samsung.com> wrote:
> On Tue, 08 Oct 2013 07:31:25 -0700
> Bart Schaefer <schaefer@brasslantern.com> wrote:
> > I'm wondering if backslash ought to be treated specially in more of the
> > history code.  In particular:
> >
> > torch% print !\!; print foo       
> > zsh: event not found: \!
> > torch% 
> > 
> > One might think one could use that form to search for a command line
> > that begins with a literal exclamation point, but no.
> 
> Hmm... the documentation does indeed imply backslash is some sort of a
> quote for history.  Actually, I think it's just talking about escaping
> the initial ! and then goes into its usual "it sort of vaguely works
> like this but nobody ever really thought it through from beginning to
> end" mode.  However, you might think you were morally entitled to have a
> backslash at that point either isolate the backslashed expression from
> what went before (so it behaves just like a single !), or to be treated
> as a string argument, and I would think the second, the one you
> mentioned, is rather more useful.

I put this badly --- I meant, of course, the "!" should be treated as a
string argument, not the "\".

pws


      reply	other threads:[~2013-10-08 15:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-07 15:55 Hauke Petersen
2013-10-08  2:56 ` Bart Schaefer
2013-10-08 14:31   ` Bart Schaefer
2013-10-08 14:44     ` Peter Stephenson
2013-10-08 15:43       ` Peter Stephenson [this message]

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=20131008164313.23edae67@pwslap01u.europe.root.pri \
    --to=p.stephenson@samsung.com \
    --cc=zsh-workers@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).