From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8698 invoked from network); 26 Sep 2002 17:06:43 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 26 Sep 2002 17:06:43 -0000 Received: (qmail 10731 invoked by alias); 26 Sep 2002 17:06:17 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 5392 Received: (qmail 10710 invoked from network); 26 Sep 2002 17:06:16 -0000 From: "Bart Schaefer" Message-Id: <1020926170547.ZM1625@candle.brasslantern.com> Date: Thu, 26 Sep 2002 17:05:47 +0000 In-Reply-To: <20020926101224.GA30361@freepuppy.bellavista.cz> Comments: In reply to Roman Neuhauser "Re: history expansion" (Sep 26, 12:12pm) References: <20020925103319.GC30361@freepuppy.bellavista.cz> <1020925234333.ZM6021@candle.brasslantern.com> <20020926101224.GA30361@freepuppy.bellavista.cz> <20465.1033036099@csr.com> X-Mailer: Z-Mail (5.0.0 30July97) To: zsh users Subject: Re: history expansion MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Sep 26, 12:12pm, Roman Neuhauser wrote: } Subject: Re: history expansion } } > } % !!:s/!!3/!-2:s,foo,bar,/ } } > There isn't any option or other setting that allows history expansions } > to be nested in that way. } } not knowing the internals of the history expansion, what is the } probability of nested expansion appearing in zsh? On Sep 26, 11:28am, Peter Stephenson wrote: } } It doesn't look *that* difficult, but it's not completely trivial (some } of the state is currently kept in global variables) so it's a bit of } work In particular I'm concerned about the default (non-CSH_JUNKIE) history behavior: By default, a history reference with no event designator refers to the same event as any preceding history reference on that command line; if it is the only history reference in a command, it refers to the previous command. Within a nested expression, which references "precede" which others? If yet another history reference follows (in a separate word) a nested reference, which of the subexpressions of the nested reference determines which event is used by that second reference? (If this thread continues, it should be moved to zsh-workers.) -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net