From: "Bart Schaefer" <schaefer@brasslantern.com>
To: "Heinrich Götzger" <Heinrich.Goetzger@exploding-systems.de>,
zsh-users@sunsite.dk
Subject: Re: exclamation mark expansion in shell command
Date: Wed, 2 Oct 2002 16:23:11 +0000 [thread overview]
Message-ID: <1021002162312.ZM18476@candle.brasslantern.com> (raw)
In-Reply-To: =?iso-8859-1?Q?=3CPine=2ELNX=2E4=2E44=2E0210021718100=2E26691?= =?iso-8859-1?Q?-100000=40server=3E?= =?iso-8859-1?Q?Comments=3A_In_reply_to_Heinrich_G=F6tzger_=3CHeinrich=2EG?= =?iso-8859-1?Q?oetzger=40exploding-systems=2Ede=3E?= =?iso-8859-1?Q?________=22exclamation_mark_expansion_in_shell_command=22_?= =?iso-8859-1?Q?=28Oct__2=2C__5=3A23pm=29?=
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
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.)
Finally, you can `setopt nobanghist' to turn off all history expansion.
If none of those seems to cover your situation, you'll have to explain in
more detail.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
next prev parent reply other threads:[~2002-10-02 16:24 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 [this message]
2002-10-02 19:55 ` Heinrich Götzger
2002-10-08 9:36 ` Heinrich Götzger
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=1021002162312.ZM18476@candle.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=Heinrich.Goetzger@exploding-systems.de \
--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).