From: "Heinrich Götzger" <Heinrich.Goetzger@exploding-systems.de>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: zsh-users@sunsite.dk
Subject: Re: exclamation mark expansion in shell command
Date: Tue, 8 Oct 2002 11:36:13 +0200 (CEST) [thread overview]
Message-ID: <Pine.LNX.4.44.0210081132130.16122-100000@server> (raw)
In-Reply-To: <1021002162312.ZM18476@candle.brasslantern.com>
Bart,
On Wed, 2 Oct 2002, Bart Schaefer wrote:
> On Oct 2, 5:23pm, Heinrich Götzger wrote:
> }
> } I'm looking without success yet for a simple way to prevent zsh to expand
> } my cmd arguments (including !) to my history.
>
> There are several ways.
>
> First, history is not expanded for words in single quotes:
>
> zsh% echo '!foo'
> !foo
This works fine.
>
> Second, you can disable history expansion for a single command line by
> prefixing the line with !" like so:
>
> zsh% !" echo !foo
> !foo
>
> Note that in all versions of zsh less than 4.1.0, the "magic-space" key
> binding ignores the !" and still causes history to expand as you type.
> (In fact, it'll erase the !" as soon as you type the space after it.)
I'm using zsh 4.0.2 on Linux and if I type the line from the beginning,
the described behavior occures. But If I edit the command line in a way
that I add the !" at the beginning after typing the rest works as well.
> Finally, you can `setopt nobanghist' to turn off all history expansion.
This works very well as well.
Thanks again.
Heinrich
next prev parent reply other threads:[~2002-10-08 9:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-02 15:23 Heinrich Götzger
2002-10-02 15:32 ` DervishD
2002-10-02 16:23 ` Bart Schaefer
2002-10-02 19:55 ` Heinrich Götzger
2002-10-08 9:36 ` Heinrich Götzger [this message]
2002-10-08 16:36 ` Bart Schaefer
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=Pine.LNX.4.44.0210081132130.16122-100000@server \
--to=heinrich.goetzger@exploding-systems.de \
--cc=schaefer@brasslantern.com \
--cc=zsh-users@sunsite.dk \
/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).