zsh-workers
 help / color / mirror / code / Atom feed
* Re: zsh funcs
@ 1996-10-11 15:03 Vinnie Shelton
  1996-10-11 15:37 ` Zefram
  0 siblings, 1 reply; 4+ messages in thread
From: Vinnie Shelton @ 1996-10-11 15:03 UTC (permalink / raw)
  To: zsh-workers; +Cc: Tom Doran

Somewhere between 3.0.0 and 3.0.1-test3, my namedir function (can't
remember the attribution, sorry) stopped working:

  # Shorten the current directory to a ~ name
  # (Only works as a zsh function)
 
  $1=$PWD
  : ~$1

It used to name the current directory; now it outputs this error:

zsh: no such file or directory: tf=/vobs/devel/shared/hsd100/testfiles

Vin Shelton


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: zsh funcs
  1996-10-11 15:03 zsh funcs Vinnie Shelton
@ 1996-10-11 15:37 ` Zefram
  1996-10-11 15:49   ` Vinnie Shelton
  0 siblings, 1 reply; 4+ messages in thread
From: Zefram @ 1996-10-11 15:37 UTC (permalink / raw)
  To: acs; +Cc: zsh-workers, doran

>  $1=$PWD
>  : ~$1

This should be

eval $1=\$PWD
: ~$1

-zefram


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: zsh funcs
  1996-10-11 15:37 ` Zefram
@ 1996-10-11 15:49   ` Vinnie Shelton
  1996-10-13 22:09     ` Zoltan Hidvegi
  0 siblings, 1 reply; 4+ messages in thread
From: Vinnie Shelton @ 1996-10-11 15:49 UTC (permalink / raw)
  To: Zefram; +Cc: zsh-workers

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?

--vin


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: zsh funcs
  1996-10-11 15:49   ` Vinnie Shelton
@ 1996-10-13 22:09     ` Zoltan Hidvegi
  0 siblings, 0 replies; 4+ messages in thread
From: Zoltan Hidvegi @ 1996-10-13 22:09 UTC (permalink / raw)
  To: acs; +Cc: zefram, zsh-workers

> 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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1996-10-13 22:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-10-11 15:03 zsh funcs Vinnie Shelton
1996-10-11 15:37 ` Zefram
1996-10-11 15:49   ` Vinnie Shelton
1996-10-13 22:09     ` Zoltan Hidvegi

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).