A csh question ...

Lloyd Zusman ljz at fxgrp.UUCP
Sat May 21 07:18:29 AEST 1988


A question concerning csh:

Can anyone explain why .login gets sourced *after* .cshrc?  I am constantly
running into situations where I'd like .login to get sourced first, and I
cannot see any good reasons for why it should get sourced after .cshrc.

I end up doing things like the following hack to get around this:

    # This resides at the top of a hypothetical .cshrc file ...

    if (! ${?FIRST_TIME_THROUGH}) then
    	setenv FIRST_TIME_THROUGH
    	# do all sorts of startup stuff that I would prefer to put
    	# into .login if it were only sourced before .cshrc
    endif

    ...

Are there any csh's out there that do this differently, perhaps if some
command-line flag is set?

--
  Lloyd Zusman                          UUCP:   ...!ames!fxgrp!ljz
  Master Byte Software              Internet:   ljz%fx.com at ames.arc.nasa.gov
  Los Gatos, California               or try:   fxgrp!ljz at ames.arc.nasa.gov
  "We take things well in hand."



More information about the Comp.unix.questions mailing list