From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14698 invoked from network); 8 Sep 2006 17:23:30 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.4 (2006-07-25) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.4 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 8 Sep 2006 17:23:30 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 9249 invoked from network); 8 Sep 2006 17:23:22 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 8 Sep 2006 17:23:22 -0000 Received: (qmail 17228 invoked by alias); 8 Sep 2006 17:16:27 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10696 Received: (qmail 13550 invoked from network); 8 Sep 2006 17:06:28 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 8 Sep 2006 17:06:28 -0000 Received: (qmail 53854 invoked from network); 8 Sep 2006 17:06:28 -0000 Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by a.mx.sunsite.dk with SMTP; 8 Sep 2006 17:06:27 -0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1GLjny-0007hl-GM for zsh-users@sunsite.dk; Fri, 08 Sep 2006 19:06:14 +0200 Received: from 241.119-84-212.staticip.namesco.net ([212.84.119.241]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 08 Sep 2006 19:06:14 +0200 Received: from david by 241.119-84-212.staticip.namesco.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 08 Sep 2006 19:06:14 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: zsh-users@sunsite.dk From: zzapper Subject: Re: Refereing to elements in current command line Date: Fri, 8 Sep 2006 17:05:54 +0000 (UTC) Organization: SuccessTheory Message-ID: References: <450198AD.1070104@bigasterisk.com> X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 241.119-84-212.staticip.namesco.net User-Agent: Xnews/5.04.25 Sender: news Drew Perttula wrote in news:450198AD.1070104 @bigasterisk.com: > > cp fredjoesid.php !#$:s/fred/dan > > then tab to check that the last argument expands the way you want > Drew, Yep that's what I was looking for Summary AFAICT For CURRENT line (the # designates current line) !#:0 command !#^ first parameter !#:1 first parameter !#:1-4 first 4 parameters !#$ last parameter !#* all parameters !#$:s/bash/zsh For Previous Command (for comparison) !! repeat !:0 command !^ first parameter !:1 first parameter !:1-4 first 4 parameters !$ last parameter !* all parameters !!:s/bash/zsh For last but one command !-2:2 second parameter of second but last command -- http://successtheory.com/tips/ Vim, Zsh, MySQL Tips