From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: zsh-workers-request@euclid.skiles.gatech.edu Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by coral.primenet.com.au (8.7.5/8.7.3) with ESMTP id IAA07936 for ; Mon, 14 Oct 1996 08:40:19 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id SAA16356; Sun, 13 Oct 1996 18:39:26 -0400 (EDT) Resent-Date: Sun, 13 Oct 1996 18:39:26 -0400 (EDT) From: Zoltan Hidvegi Message-Id: <199610132209.AAA01406@hzoli.ppp.cs.elte.hu> Subject: Re: zsh funcs To: acs@world.std.com Date: Mon, 14 Oct 1996 00:09:42 +0200 (MET DST) Cc: zefram@dcs.warwick.ac.uk, zsh-workers@math.gatech.edu In-Reply-To: <199610111549.LAA14209@spacely.icd.teradyne.com> from Vinnie Shelton at "Oct 11, 96 11:49:34 am" X-Mailer: ELM [version 2.4ME+ PL17 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-ID: <"AIcSm3.0.U_3.T-MOo"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/2220 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu > zefram@dcs.warwick.ac.uk said: > > This should be > > > eval $1=\$PWD : ~$1 > > > -zefram > > Thanks, but why is this necessary? Was the change in behavior intentional? I would not say that it was intentional. I always thought that eval is necessary for that. In addvars() there is an explicite singsub() call to substitute the left-hand-side of an assignment which is now only used to substitute the index of the assignment. The change was that the lexer gives the assignment token only if a word of the form number=value or name=value or name[index]=value appears in command position where name has only alphanumeric characters and underscores and starts with a letter or an underscore. This fixes problems with 1foo=bar assignments. Zoltan