home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.emacs
- Path: sparky!uunet!cs.utexas.edu!torn!cunews!nrcnet0!bnrgate!bmerh85!bmerh85!hamish
- From: Hamish.Macdonald@x400gate.bnr.ca (Hamish Macdonald)
- Subject: Re: shell command and macro completion
- In-Reply-To: peta@thunder.mcrcim.mcgill.edu's message of 9 Sep 92 16:38:27 GMT
- Message-ID: <1992Sep09.182848.10726@bmerh85.bnr.ca>
- Lines: 34
- Sender: news@bmerh85.bnr.ca (Usenet News)
- Organization: Bell Northern Research
- References: <1992Sep3.171417.21110@TorreyPinesCA.ncr.com>
- <JCT.92Sep8091931@se33.wg2.waii.com>
- <1992Sep9.163827.12528@thunder.mcrcim.mcgill.edu>
- Date: Wed, 09 Sep 92 18:28:48 GMT
-
- >>>>> On 9 Sep 92 16:38:27 GMT,
- >>>>> In message <1992Sep9.163827.12528@thunder.mcrcim.mcgill.edu>,
- >>>>> peta@thunder.mcrcim.mcgill.edu (Peter Whaite) wrote:
-
- [someone puts setting of PATH and MANPATH in .login instead of .cshrc]
-
- Peter> I used to do this but I dont recommend it anymore. The reason
- Peter> is that 'rsh' doesnt run your .login. Its a real pain starting
- Peter> up X clients -- you have to explicitly source your .login in
- Peter> the command given to the rsh. (Yes you could write your own rsh
- Peter> script)
-
- Peter> Also dont forget that everytime path (or PATH) is set it is
- Peter> rehashed -- this is what takes the time. I do it all in one
- Peter> shot, and it doesnt appreciably slow things down, e.g.
-
- Or perhaps put the setting of all these in your .cshrc, but condition
- it upon the setting of some environment variable.
-
- This variable is unset for the first shell in a process tree. The
- first shell does all the variable setting, and then sets this variable
- to some value.
-
- if ( ! $?ENVSET ) then
- setenv PATH ...
- setenv MANPATH ...
- ...
-
- setenv ENVSET done
- endif
-
- This way your environment is setup for every "root" shell (rsh,
- login), but is not redone for every subsequent shell (descendant of
- the first).
-