What should be in .cshrc vs .login

Joe Smith jms at tardis.Tymnet.COM
Tue Oct 23 07:05:52 AEST 1990


In article <FPB.90Oct21120952 at ittc.ittc.wec.com> fpb at ittc.wec.com (Frank P. Bresz) writes:
>PATH IMHO is something that should be set at login time only.  It should
> be inherited by all subsequent shells including sunview, xterminals etc.
>
>	Now for the question (flame request) of the day.  Do people in
>general agree with me that .cshrc ought to not touch the path variable or
>the PATH env and just inherit it?

I used to agree that setting $PATH in .login was the way to go, until I got
bit by having rsh (remote shell) not doing what it was expected to.  For
instance, while logged in on a BSD system, I type something like "foo -a -b"
and csh executes /usr/local/bar/foo.  Then I type "delta !!" which is the
same as "rsh delta foo -a -b".  This fails if delta:.cshrc does not have
a suitable "set path" command.  The remote shell does not inherit the
envronment variables from the invoking machine.

I have moved the $path definition to .cshrc for that reason.  (I have also
moved the "setenv MANPATH" to be adjacent to the "set path" to remind me to
change MANPATH if needed when PATH changes.)
-- 
Joe Smith (408)922-6220 | SMTP: jms at tardis.tymnet.com or jms at gemini.tymnet.com
BT Tymnet Tech Services | UUCP: ...!{ames,pyramid}!oliveb!tymix!tardis!jms
PO Box 49019, MS-C41    | BIX: smithjoe | 12 PDP-10s still running! "POPJ P,"
San Jose, CA 95161-9019 | humorous dislaimer: "My Amiga 3000 speaks for me."



More information about the Comp.unix.shell mailing list