Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: alias vl="vi !$"
- X-seq: zsh-users 7173
- From: Peter Stephenson <pws@xxxxxxxxxxxxxxxxxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: alias vl="vi !$"
- Date: Sun, 14 Mar 2004 16:27:01 +0000
- Cc: zsh-users@xxxxxxxxxx
- In-reply-to: "Bart Schaefer"'s message of "Thu, 11 Mar 2004 17:17:35 GMT." <1040311171735.ZM20352@xxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
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 <pws@xxxxxxxxxxxxxxxxxxxxxxxx>
Work: pws@xxxxxxx
Web: http://www.pwstephenson.fsnet.co.uk
Messages sorted by:
Reverse Date,
Date,
Thread,
Author