From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5123 invoked from network); 2 Oct 2002 19:56:55 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 2 Oct 2002 19:56:55 -0000 Received: (qmail 14345 invoked by alias); 2 Oct 2002 19:56:24 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 5415 Received: (qmail 14330 invoked from network); 2 Oct 2002 19:56:23 -0000 X-Authentication-Warning: io.exploding-systems.de: goetzger owned process doing -bs Date: Wed, 2 Oct 2002 21:55:51 +0200 (CEST) From: =?ISO-8859-1?Q?Heinrich_G=F6tzger?= Sender: goetzger@io.exploding-systems.de Reply-To: =?ISO-8859-1?Q?Heinrich_G=F6tzger?= To: zsh-users@sunsite.dk Subject: Re: exclamation mark expansion in shell command In-Reply-To: <1021002162312.ZM18476@candle.brasslantern.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE On Wed, 2 Oct 2002, Bart Schaefer wrote: >On Oct 2, 5:23pm, Heinrich G=F6tzger wrote: >} >} I'm looking without success yet for a simple way to prevent zsh to expan= d >} 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. I guess this hits the problem, I'll check on Monday in the office. If it's not working, I'll provide more details. Thanks a lot! Heinrich PS: I got every mail four times (2 times I understand, but 4 times is enough for some cc on different places;-)