Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zsh funcs
- X-seq: zsh-workers 2220
- From: Zoltan Hidvegi <hzoli@xxxxxxxxxx>
- To: acs@xxxxxxxxxxxxx
- Subject: Re: zsh funcs
- Date: Mon, 14 Oct 1996 00:09:42 +0200 (MET DST)
- Cc: zefram@xxxxxxxxxxxxxxxxx, zsh-workers@xxxxxxxxxxxxxxx
- In-reply-to: <199610111549.LAA14209@xxxxxxxxxxxxxxxxxxxxxxxx> from Vinnie Shelton at "Oct 11, 96 11:49:34 am"
> zefram@xxxxxxxxxxxxxxxxx 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author