zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@brasslantern.com>
To: Zoltan Hidvegi <hzoli@cs.elte.hu>, zsh-workers@math.gatech.edu
Subject: Re: PWD parameter
Date: Sun, 24 May 1998 19:16:00 -0700	[thread overview]
Message-ID: <980524191600.ZM10165@candle.brasslantern.com> (raw)
In-Reply-To: <199805241738.MAA25692@hzoli.home>

On May 24, 12:38pm, Zoltan Hidvegi wrote:
} Subject: Re: PWD parameter
}
} Note that PWD can be unset even without my patch after typeset +r PWD.

Hmm, and it doesn't become set again upon "cd".  That, at least, I'd say
is (was) a bug, though I suppose it might be useful in some rare cases.

} And right now you can unset any writable special parameters.

I don't really have a problem with that, in the general case.

} It is always good to reduce the number of special parameters, since they
} are more complicated to handle in various places

I'd definitely agree that we shouldn't be *increasing* the number of special
paramters.  Do the ones that are already there very often need handling that
they don't already get?

} and sometimes special
} parameters behave differently from non-special parameters.

Chuckle.  Well, yes; I imagine that's why they're called "special".

} Looks like you'd like to ignore any changes to PWD, or at least when you
} assign it you'd like to check that the assigned value is correct.

The latter, but I wouldn't go so far in defining "correct" as to require
that `cd $PWD` and `cd ~+` put you in the same place -- just that both
ought to succeed.

This is probably wandering farther into philosophy than it's worth ....

} 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.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com


  reply	other threads:[~1998-05-25  2:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-05-24  4:44 Zoltan Hidvegi
1998-05-24  5:57 ` Bart Schaefer
1998-05-24  7:51   ` Zoltan Hidvegi
1998-05-24 16:42     ` Bart Schaefer
1998-05-24 17:38       ` Zoltan Hidvegi
1998-05-25  2:16         ` Bart Schaefer [this message]
1998-05-25  3:02           ` Zoltan Hidvegi
1998-05-25  4:02             ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=980524191600.ZM10165@candle.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=hzoli@cs.elte.hu \
    --cc=zsh-workers@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).