From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 190 invoked from network); 14 Mar 2004 16:25:47 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 14 Mar 2004 16:25:47 -0000 Received: (qmail 2540 invoked by alias); 14 Mar 2004 16:25:33 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7173 Received: (qmail 2530 invoked from network); 14 Mar 2004 16:25:33 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 14 Mar 2004 16:25:33 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [195.92.195.172] by sunsite.dk (MessageWall 1.0.8) with SMTP; 14 Mar 2004 16:25:33 -0000 Received: from modem-212.green-chromis.dialup.pol.co.uk ([62.137.22.212] helo=pwstephenson.fsnet.co.uk) by cmailg2.svr.pol.co.uk with esmtp (Exim 4.14) id 1B2YQb-0001rL-E8; Sun, 14 Mar 2004 16:25:29 +0000 Received: by pwstephenson.fsnet.co.uk (Postfix, from userid 501) id 503178543; Sun, 14 Mar 2004 11:27:02 -0500 (EST) Received: from pwstephenson.fsnet.co.uk (localhost [127.0.0.1]) by pwstephenson.fsnet.co.uk (Postfix) with ESMTP id 41F0A84BC; Sun, 14 Mar 2004 16:27:02 +0000 (GMT) To: Bart Schaefer Cc: zsh-users@sunsite.dk Subject: Re: alias vl="vi !$" In-reply-to: "Bart Schaefer"'s message of "Thu, 11 Mar 2004 17:17:35 GMT." <1040311171735.ZM20352@candle.brasslantern.com> Date: Sun, 14 Mar 2004 16:27:01 +0000 From: Peter Stephenson Message-Id: <20040314162702.503178543@pwstephenson.fsnet.co.uk> Bart Schaefer wrote: > Inside a function, however, $_ has already been changed to be the last > word of the _currently executing_ command, the same as as $argv[-1]. > Which is not really all that useful, though maybe more useful than if > it had been changed to the path name of zsh or some such. > > I'm usually a stickler for backwards compatibility, but does anyone > think anything would break if the changing of $_ were delayed until > after shell functions have been called, so that it would remain the > last word of the _previous_ command? It's not likely anyone's using the present form in a function; after all there are better ways of getting the current arguments inside a function, and if the command entered isn't simply the function (there's a more complicated expression), it's hard to see why you would want the last argument. -- Peter Stephenson Work: pws@csr.com Web: http://www.pwstephenson.fsnet.co.uk