login built-in of 4.[12]bsd csh ignores ".logout" (w/change)

Mark Horton mark at cbosgd.UUCP
Thu Jul 19 01:47:20 AEST 1984


> If you want a "source ~/.logout" to be done on "login" commands,
> add this line to your ".login" file:
> 
> 	alias login 'source ~/.logout; unalias login; eval login \!*'
> 
> (The fact that both the unalias AND the eval are needed above seems like
> a bug to me; who knows?)

Actually, this isn't a bug, it's just that you get a recursive invocation
of the alias if you don't disable it.  Here's a better way to do it:
	alias login 'source ~/.logout; "login" \!*'
Whenever you build an alias around itself, if the recursion isn't
head recursion, you'll need to quote the name.



More information about the Comp.bugs.4bsd.ucb-fixes mailing list