Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!mcsun!hp4nl!star.cs.vu.nl!maart From: maart@cs.vu.nl (Maarten Litmaath) Newsgroups: comp.unix.questions Subject: Re: how do I tell inside .cshrc if I'm a login shell? Message-ID: <7243@star.cs.vu.nl> Date: 3 Aug 90 21:30:33 GMT References: <614@exodus.Eng.Sun.COM> Sender: news@cs.vu.nl Reply-To: maart@cs.vu.nl (Maarten Litmaath) Organization: VU Dept. of Computer Science, Amsterdam, The Netherlands Lines: 37 I use a scheme like this. ---------------------------------------- # .cshrc if (! $?CSHLEVEL) then setenv CSHLEVEL 0 set home = ~username # just to be sure source ~/.env # environment stuff we always want else set tmp = $CSHLEVEL @ tmp++ setenv CSHLEVEL $tmp endif # exit from .cshrc if not interactive, e.g. under rsh (BSD) if (! $?prompt) exit # aliases # set variables ---------------------------------------- # .env # umask # setenv variables ---------------------------------------- # .login # terminal setup # startup favourite window environment -- "UNIX was never designed to keep people from doing stupid things, because that policy would also keep them from doing clever things." (Doug Gwyn)