home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / next / misc / 18306 < prev    next >
Encoding:
Text File  |  1992-07-31  |  1.7 KB  |  38 lines

  1. Newsgroups: comp.sys.next.misc
  2. Path: sparky!uunet!gatech!destroyer!gumby!yale!yale.edu!ira.uka.de!chx400!bernina!waldvoge
  3. From: waldvoge@nessie.cs.id.ethz.ch (Marcel Waldvogel)
  4. Subject: Re: zsh help --- 2 "quirks"
  5. Message-ID: <1992Jul31.144116.13827@bernina.ethz.ch>
  6. Sender: news@bernina.ethz.ch (USENET News System)
  7. Organization: Swiss Federal Institute of Technology (ETH), Zurich, CH
  8. References: <1992Jul22.072454.11849@tetrasoft.com> <1992Jul23.064130.5317@nextdoor.com>
  9. Date: Fri, 31 Jul 1992 14:41:16 GMT
  10. Lines: 26
  11.  
  12. In article <1992Jul23.064130.5317@nextdoor.com> john@nextdoor.com writes:
  13. >Well, my zsh (2.2.0) exhibits neither of these quirks.  It does, however,
  14. >have a very irritating problem.
  15. >
  16. >If I su root (or any user, for that matter), and then change directories
  17. >and try to edit a file using emacs, emacs DOESN'T FIND THE FILE!  If I do
  18. >a pwd, it tells me that my default directory is where I think I am, but
  19. >emacs tries to open the file in the directory I was in when I "su'd"!
  20. >                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  21.  
  22. The same happens with tcsh. New shells such as tcsh (and presumably
  23. zsh) set the environment variable PWD to the current directory. This
  24. is a nice feature if you got to the current directory by traversing a
  25. symbolic link (which is the case if the directory has been
  26. automounted).
  27.  
  28. Old-fashioned shells, such as /bin/sh and /bin/csh don't know about
  29. this feature and don't neither change nor remove the variable. Good
  30. programs such as emacs honor the contents of PWD (but they should
  31. probably make some sanity checks on the contents).
  32.  
  33. The easiest way to solve it is to put the line
  34.     unsetenv PWD
  35. in the .cshrcs of the accounts you /bin/su to.
  36.  
  37. -Marcel
  38.