home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / emacs / 3060 < prev    next >
Encoding:
Text File  |  1992-09-09  |  1.8 KB  |  49 lines

  1. Newsgroups: comp.emacs
  2. Path: sparky!uunet!cs.utexas.edu!torn!cunews!nrcnet0!bnrgate!bmerh85!bmerh85!hamish
  3. From: Hamish.Macdonald@x400gate.bnr.ca (Hamish Macdonald)
  4. Subject: Re: shell command and macro completion
  5. In-Reply-To: peta@thunder.mcrcim.mcgill.edu's message of 9 Sep 92 16:38:27 GMT
  6. Message-ID: <1992Sep09.182848.10726@bmerh85.bnr.ca>
  7. Lines: 34
  8. Sender: news@bmerh85.bnr.ca (Usenet News)
  9. Organization: Bell Northern Research
  10. References: <1992Sep3.171417.21110@TorreyPinesCA.ncr.com>
  11.     <JCT.92Sep8091931@se33.wg2.waii.com>
  12.     <1992Sep9.163827.12528@thunder.mcrcim.mcgill.edu>
  13. Date: Wed, 09 Sep 92 18:28:48 GMT
  14.  
  15. >>>>> On 9 Sep 92 16:38:27 GMT,
  16. >>>>> In message <1992Sep9.163827.12528@thunder.mcrcim.mcgill.edu>,
  17. >>>>> peta@thunder.mcrcim.mcgill.edu (Peter Whaite) wrote:
  18.  
  19. [someone puts setting of PATH and MANPATH in .login instead of .cshrc]
  20.  
  21. Peter> I used to do this but I dont recommend it anymore.  The reason
  22. Peter> is that 'rsh' doesnt run your .login. Its a real pain starting
  23. Peter> up X clients -- you have to explicitly source your .login in
  24. Peter> the command given to the rsh. (Yes you could write your own rsh
  25. Peter> script)
  26.  
  27. Peter> Also dont forget that everytime path (or PATH) is set it is
  28. Peter> rehashed -- this is what takes the time.  I do it all in one
  29. Peter> shot, and it doesnt appreciably slow things down, e.g.
  30.  
  31. Or perhaps put the setting of all these in your .cshrc, but condition
  32. it upon the setting of some environment variable.
  33.  
  34. This variable is unset for the first shell in a process tree.  The
  35. first shell does all the variable setting, and then sets this variable
  36. to some value.
  37.  
  38. if ( ! $?ENVSET ) then
  39.    setenv PATH ...
  40.    setenv MANPATH ...
  41.    ...
  42.  
  43.    setenv ENVSET done
  44. endif
  45.  
  46. This way your environment is setup for every "root" shell (rsh,
  47. login), but is not redone for every subsequent shell (descendant of
  48. the first).
  49.