From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gatech.edu (gatech.edu [130.207.244.244]) by werple.mira.net.au (8.6.12/8.6.9) with SMTP id DAA04610 for ; Wed, 16 Aug 1995 03:06:23 +1000 Received: from math (math.skiles.gatech.edu) by gatech.edu with SMTP id AA16247 (5.65c/Gatech-10.0-IDA for ); Tue, 15 Aug 1995 13:07:38 -0400 Received: by math (5.x/SMI-SVR4) id AA07987; Tue, 15 Aug 1995 13:02:49 -0400 Resent-Date: Tue, 15 Aug 1995 19:02:04 +0200 (MET DST) Old-Return-Path: From: hzoli@cs.elte.hu (Zoltan Hidvegi) Message-Id: <9508151702.AA18359@turan.elte.hu> Subject: Re: hzoli change: $foo:s//r/ To: heading_anthony@jpmorgan.com (Heading Anthony) Date: Tue, 15 Aug 1995 19:02:04 +0200 (MET DST) Cc: zsh-workers@math.gatech.edu (zsh-workers) In-Reply-To: from "Heading, Anthony" at Aug 15, 95 12:49:02 pm X-Mailer: ELM [version 2.4 PL23] Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-Id: <"kbOQH3.0.jy1.uCDCm"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/313 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Anthony Heading wrote: > > Sorry I missed this first time round. > > hzoli changelog of Jul 10 says: > - $foo:s//r/ gives ... error message ... (194) > > Now the following used to work > > % array=(a b c d e) > % echo $array:s//\&-\&/ > a-a b-b c-c d-d e-e > > I remember I had a use for this once... The problem is that the manual says that zsh should use the left-hand-side of the last substitution if the substitution string is empty. And the history code also does this. Also the code in hist.c which produced that feature you describe was buggy and it sometimes got into an infinite loop (or did some even worse thing). So what you used so far was probably an undocumented bug. Maybe we can find an other syntax for that. Zoltan