Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PWD parameter
- X-seq: zsh-workers 3997
- From: Zoltan Hidvegi <hzoli@xxxxxxxxxx>
- To: schaefer@xxxxxxxxxxxxxxxx (Bart Schaefer)
- Subject: Re: PWD parameter
- Date: Sun, 24 May 1998 22:02:28 -0500 (CDT)
- Cc: zsh-workers@xxxxxxxxxxxxxxx
- In-reply-to: <980524191600.ZM10165@xxxxxxxxxxxxxxxxxxxxxxx> from Bart Schaefer at "May 24, 98 07:16:00 pm"
> } This is exacly how zsh behaves after typeset +r PWD.
>
> Not quite. For example, my $HOME is /home/schaefer, but that's really a
> symlink to /extra/home/schaefer. In zsh 3.0.5, if I do
>
> cd $HOME
> typeset +r PWD
> unset PWD
> PWD=/extra/home/schaefer
> echo $PWD
>
> then what I get back is /home/schaefer. *That* seems a bit odd.
PWD has nullsetfn as the write function. Since PWD is special, unset
just sets a flag in the Param node, it does not really unset anything.
The PWD=... assignment clears this flag, restoring the old value of PWD.
The assigned value is lost.
Zoltan
Messages sorted by:
Reverse Date,
Date,
Thread,
Author