From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29975 invoked from network); 11 Mar 2004 23:45:29 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 11 Mar 2004 23:45:29 -0000 Received: (qmail 9680 invoked by alias); 11 Mar 2004 23:45:10 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7153 Received: (qmail 9665 invoked from network); 11 Mar 2004 23:45:10 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 11 Mar 2004 23:45:10 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [80.91.224.249] by sunsite.dk (MessageWall 1.0.8) with SMTP; 11 Mar 2004 23:45:9 -0000 Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1B1ZrR-0002Ou-00 for ; Fri, 12 Mar 2004 00:45:09 +0100 Received: from isi-dialin-129-211.isionline-dialin.de ([195.158.129.211]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 12 Mar 2004 00:45:09 +0100 Received: from thorsten by isi-dialin-129-211.isionline-dialin.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 12 Mar 2004 00:45:09 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: zsh-users@sunsite.dk From: Thorsten Kampe Subject: Re: alias vl="vi !$" Date: Fri, 12 Mar 2004 00:45:06 +0100 Message-ID: <196drxel5uagx.dlg@thorstenkampe.de> References: <65a050lf2u4bjch4u2uv68q56u5co0gknp@4ax.com> <20040311091003.GD844@mail.guild.uwa.edu.au> <4im0509toihq2ef1vlnnid6t93j90f6gor@4ax.com> <15272.1079008435@csr.com> <39n050dv0evle58451ugj2m1vfktsj1e1b@4ax.com> <20040311125558.GA24218@picard.franken.de> <1040311171735.ZM20352@candle.brasslantern.com> <20040311190553.GA12542@blorf.net> <32i150hh818rpo58g8bn3cqnor8trbiaej@4ax.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: isi-dialin-129-211.isionline-dialin.de User-Agent: 40tude_Dialog/2.0.10.1de Sender: news * zzapper (2004-03-11 21:13 +0100) > On Thu, 11 Mar 2004 11:05:53 -0800, wrote: >>On Thu, Mar 11, 2004 at 05:17:35PM +0000, 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]. >> >>But it's not changed in an alias, so the simplest approach would appear >>to be: >> >> alias vl='vi $_' > > That is so wunderbar!!! And the most wonderful thing is that you probably don't need all that stuff (alias, function) and simply type "vi [Alt]+[.]" ("insert-last-word"). Because this is common sequence like cat rm it doesn't make sense to make aliases or functions for all the countless possibilities. Thorsten