From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5625 invoked from network); 8 Oct 2002 16:37:38 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 8 Oct 2002 16:37:38 -0000 Received: (qmail 16821 invoked by alias); 8 Oct 2002 16:37:15 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 5428 Received: (qmail 16797 invoked from network); 8 Oct 2002 16:37:13 -0000 From: "Bart Schaefer" Message-Id: <1021008163637.ZM15001@candle.brasslantern.com> Date: Tue, 8 Oct 2002 16:36:37 +0000 In-Reply-To: =?iso-8859-1?Q?=3CPine=2ELNX=2E4=2E44=2E0210081132130=2E16122?= =?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?________=22Re=3A_exclamation_mark_expansion_in_shell_comma?= =?iso-8859-1?Q?nd=22_=28Oct__8=2C_11=3A36am=29?= References: X-Mailer: Z-Mail (5.0.0 30July97) To: =?iso-8859-1?Q?Heinrich_G=F6tzger?= Subject: Re: exclamation mark expansion in shell command Cc: zsh-users@sunsite.dk MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable On Oct 8, 11:36am, Heinrich G=F6tzger wrote: } = } On Wed, 2 Oct 2002, Bart Schaefer wrote: } = } > zsh% !" echo !foo } > !foo } > } > Note that in all versions of zsh less than 4.1.0, the "magic-space" k= ey } > binding ignores the !" and still causes history to expand as you type= =2E } > (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.= Just to clarify ... Yes, you can add the !" after the fact to avoid having it removed by magic-space. However, whether or not the !" is present, magic-space will= attempt to expand every history reference on the line if at any time you type a space (and you're using the magic-space binding, obviously). This has been fixed in 4.1.0-dev* so that magic-space recognizes when a leading !" is present and does not expand history in that case. -- = 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 = =