home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!darwin.sura.net!spool.mu.edu!hri.com!snorkelwacker.mit.edu!thunder.mcrcim.mcgill.edu!peta
- From: peta@thunder.mcrcim.mcgill.edu (Peter Whaite)
- Newsgroups: comp.emacs
- Subject: Re: shell command and macro completion
- Message-ID: <1992Sep9.163827.12528@thunder.mcrcim.mcgill.edu>
- Date: 9 Sep 92 16:38:27 GMT
- References: <1992Sep3.171417.21110@TorreyPinesCA.ncr.com> <JCT.92Sep8091931@se33.wg2.waii.com>
- Organization: McGill Research Centre for Intelligent Machines
- Lines: 38
-
- In article <JCT.92Sep8091931@se33.wg2.waii.com> thompson@wg2.waii.com writes:
- >
- >I think the best solution is to determine why your .cshrc takes so
- >long and do something to make it quicker. I once had this problem,
- >because I was setting my PATH and MANPATH inside of .cshrc; I had
- >about twenty directories to search, and I added them to PATH one at a
- >time. It took forever.
- >
- >Finally it occurred to me that PATH and all environment variables are
- >inherited, so they can go in .login. I moved ALL my environment setup
- >to .login and kept in .cshrc only the few aliases and sets I use.
- >This sped things up tremendously.
-
- I used to do this but I dont recommend it anymore. The reason is that 'rsh'
- doesnt run your .login. Its a real pain starting up X clients -- you have to
- explicitly source your .login in the command given to the rsh. (Yes you could
- write your own rsh script)
-
- Also dont forget that everytime path (or PATH) is set it is rehashed -- this
- is what takes the time. I do it all in one shot, and it doesnt appreciably
- slow things down, e.g.
-
- set gnu_path = ( /local/gnu/expt/bin /local/gnu/bin )
- set X11_path = ( /local/X11/bin )
- set cap_path = ( /local/cap/bin )
- set app_path = ( /local/TeX/bin /local/matlab/bin /local/maple/bin)
- set news_path = ( /local/usenet/bin )
- set my_path = ( . ~/bin )
- set loc_path = ( /local/3d/bin /local/mouse/bin /local/bin)
- set loc_sys_path = ($gnu_path /local/std/bin )
- set std_sys_path = ( /usr/ucb /usr/bin /bin /sbin /usr/hosts )
- set sys_path = ( $loc_sys_path $std_sys_path)
- set adm_path = ( /usr/etc /etc /local/etc)
- set path = ( $my_path $cap_path $sys_path $adm_path\
- $X11_path $app_path $loc_path\
- $news_path $demo_path $tw_path )
- unset *_path
-