From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27596 invoked by alias); 22 Jan 2015 13:35:25 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 19763 Received: (qmail 4882 invoked from network); 22 Jan 2015 13:35:12 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, RCVD_NUMERIC_HELO,SPF_HELO_PASS,T_FSL_HELO_BARE_IP_2 autolearn=no version=3.3.2 X-Injected-Via-Gmane: http://gmane.org/ To: zsh-users@zsh.org From: zzapper Subject: Re: refering to 2nd from last history parameter? Date: Thu, 22 Jan 2015 13:34:59 +0000 (UTC) Organization: Your Company Message-ID: References: X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 95.146.95.132 User-Agent: Xnews/2009.05.01 X-Antivirus: avast! (VPS 150122-1, 22/01/2015), Outbound message X-Antivirus-Status: Clean Peter Stephenson wrote in news:CAECNH1RyC2Q-5y3Ynk-F+cJvtRvFPWdvcpDOqXmrJB=uSJCbTQ@mail.gmail.com: > On Thu, 22 Jan 2015 12:18:19 +0000 > zzapper wrote: >> I don't think it's possible >> >> ls !$ last parameter of previous command >> >> echo a b c d e f g h >> >> I don't think I can grab 'g' without counting left to right > > This isn't actually a question :-). What are you trying to do? Are you > at the shell command line trying to extract something and don't care Peter I realised I hadn't been clear. echo a b c d e f g h echo !:7 g but it would be cuter if I could specify echo !:$-1 ### doesnt work but is there anyway to do this? (I may have asked this before) --- This email has been checked for viruses by Avast antivirus software. http://www.avast.com