Article View: comp.unix.shell
Article #1574What should be in .cshrc vs .login
From: Joe Smith
Date: Mon, 22 Oct 1990 21:05
Date: Mon, 22 Oct 1990 21:05
24 lines
1909 bytes
1909 bytes
In article <FPB.90Oct21120952@ittc.ittc.wec.com> fpb@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@tardis.tymnet.com or jms@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."
Technical Details
Message-ID:
<1300@tardis.Tymnet.COM>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!cs.utexas.edu!sun-barr!olivea!tymix!tardis!jmsReferences:
<1294@tardis.Tymnet.COM> <FPB.90Oct21120952@ittc.ittc.wec.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!cs.utexas.edu!sun-barr!olivea!tymix!tardis!jms From: jms@tardis.Tymnet.COM (Joe Smith) Newsgroups: comp.unix.shell Subject: What should be in .cshrc vs .login Summary: Watch out for /usr/ucb/rsh Message-ID: <1300@tardis.Tymnet.COM> Date: 22 Oct 90 21:05:52 GMT References: <1294@tardis.Tymnet.COM> <FPB.90Oct21120952@ittc.ittc.wec.com> Reply-To: jms@tardis.Tymnet.COM (Joe Smith) Organization: BT Tymnet, San Jose, CA Lines: 24