From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8183 invoked from network); 16 Nov 2004 16:41:44 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 16 Nov 2004 16:41:44 -0000 Received: (qmail 64274 invoked from network); 16 Nov 2004 16:11:40 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 16 Nov 2004 16:11:40 -0000 Received: (qmail 27861 invoked by alias); 16 Nov 2004 16:08:10 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8222 Received: (qmail 27788 invoked from network); 16 Nov 2004 16:08:08 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 16 Nov 2004 16:08:08 -0000 Received: (qmail 60635 invoked from network); 16 Nov 2004 16:08:07 -0000 Received: from mailhost1.csr.com (HELO MAILSWEEPER01.csr.com) (81.105.217.43) by a.mx.sunsite.dk with SMTP; 16 Nov 2004 16:08:05 -0000 Received: from exchange03.csr.com (unverified [10.100.137.60]) by MAILSWEEPER01.csr.com (Content Technologies SMTPRS 4.3.12) with ESMTP id for ; Tue, 16 Nov 2004 16:06:54 +0000 Received: from news01.csr.com ([10.103.143.38]) by exchange03.csr.com with Microsoft SMTPSVC(5.0.2195.6713); Tue, 16 Nov 2004 16:07:53 +0000 Received: from news01.csr.com (localhost.localdomain [127.0.0.1]) by news01.csr.com (8.12.11/8.12.11) with ESMTP id iAGG83Je002896 for ; Tue, 16 Nov 2004 16:08:03 GMT Received: from csr.com (pws@localhost) by news01.csr.com (8.12.11/8.12.11/Submit) with ESMTP id iAGG83Kh002893 for ; Tue, 16 Nov 2004 16:08:03 GMT Message-Id: <200411161608.iAGG83Kh002893@news01.csr.com> X-Authentication-Warning: news01.csr.com: pws owned process doing -bs To: zsh-users@sunsite.dk Subject: Re: !!:$ In-reply-to: <20041116143144.GA23971@sc> References: <20041116134539.GB14064@pegleg.valdosta.edu> <200411161422.iAGEMTuv032704@news01.csr.com> <20041116143144.GA23971@sc> Date: Tue, 16 Nov 2004 16:08:02 +0000 From: Peter Stephenson X-OriginalArrivalTime: 16 Nov 2004 16:07:53.0529 (UTC) FILETIME=[6DA74A90:01C4CBF6] X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=0.0 required=6.0 tests=none autolearn=no version=2.63 X-Spam-Hits: 0.0 Stephane Chazelas wrote: > Wouldn't it be the same as ${(%):-%!}? Yes, except much more obvious. Bart wrote: > Umm. > > HISTNO (integer) > The current history number. Setting this has the same effect as > moving up or down in the history to the corresponding history line. > An attempt to set it is ignored if the line is not stored in the > history. > > Admittedly this is available only in widgets, but it seems odd to have two > variables for the same thing. You didn't read down the patch far enough. +history. Note this is not the same as the parameter tt(HISTCMD), +which always give the number of the history line being added to the main +shell's history. tt(HISTNO) refers to the line being retrieved within +zle. >> Then you can always get the full previous line as >> $history[$((HISTCMD-1))]. > > Unfortunately that doesn't always work. If you setopt HIST_IGNORE_DUPS, > $history[$((HISTNO-1))] may be empty. That's a nuisance. Maybe we need an ordinary array which always gives the last items in the history, too. -- Peter Stephenson Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070 ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com **********************************************************************