Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: exclamation mark expansion in shell command
- X-seq: zsh-users 5413
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxx>
- To: Heinrich Götzger <Heinrich.Goetzger@xxxxxxxxxxxxxxxxxxxx>, zsh-users@xxxxxxxxxx
- Subject: Re: exclamation mark expansion in shell command
- Date: Wed, 2 Oct 2002 16:23:11 +0000
- In-reply-to: <Pine.LNX.4.44.0210021718100.26691-100000@server>Comments: In reply to Heinrich Götzger <Heinrich.Goetzger@xxxxxxxxxxxxxxxxxxxx> "exclamation mark expansion in shell command" (Oct 2, 5:23pm)
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <Pine.LNX.4.44.0210021718100.26691-100000@server>
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author