🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.next.misc
Article #555

Re: zsh help --- 2 "quirks"

#555
From: Marcel Waldvogel
Date: Fri, 31 Jul 1992 14:41
26 lines
1760 bytes
In article <1992Jul23.064130.5317@nextdoor.com> john@nextdoor.com writes:
>Well, my zsh (2.2.0) exhibits neither of these quirks.  It does, however,
>have a very irritating problem.
>
>If I su root (or any user, for that matter), and then change directories
>and try to edit a file using emacs, emacs DOESN'T FIND THE FILE!  If I do
>a pwd, it tells me that my default directory is where I think I am, but
>emacs tries to open the file in the directory I was in when I "su'd"!
>                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

The same happens with tcsh. New shells such as tcsh (and presumably
zsh) set the environment variable PWD to the current directory. This
is a nice feature if you got to the current directory by traversing a
symbolic link (which is the case if the directory has been
automounted).

Old-fashioned shells, such as /bin/sh and /bin/csh don't know about
this feature and don't neither change nor remove the variable. Good
programs such as emacs honor the contents of PWD (but they should
probably make some sanity checks on the contents).

The easiest way to solve it is to put the line
	unsetenv PWD
in the .cshrcs of the accounts you /bin/su to.

-Marcel
Technical Details
Message-ID: <1992Jul31.144116.13827@bernina.ethz.ch>
Path: arc1-ca.pugleaf.net!sparky!uunet!gatech!destroyer!gumby!yale!yale.edu!ira.uka.de!chx400!bernina!waldvoge
References: <1992Jul22.072454.11849@tetrasoft.com> <1992Jul23.064130.5317@nextdoor.com>

Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.next.misc
Path: arc1-ca.pugleaf.net!sparky!uunet!gatech!destroyer!gumby!yale!yale.edu!ira.uka.de!chx400!bernina!waldvoge
From: waldvoge@nessie.cs.id.ethz.ch (Marcel Waldvogel)
Subject: Re: zsh help --- 2 "quirks"
Message-ID: <1992Jul31.144116.13827@bernina.ethz.ch>
Sender: news@bernina.ethz.ch (USENET News System)
Organization: Swiss Federal Institute of Technology (ETH), Zurich, CH
References: <1992Jul22.072454.11849@tetrasoft.com> <1992Jul23.064130.5317@nextdoor.com>
Date: Fri, 31 Jul 1992 14:41:16 GMT
Lines: 26