How to alias 'exit' in csh?

Maarten Litmaath maart at cs.vu.nl
Wed Sep 20 09:09:29 AEST 1989


jdpeek at rodan.acs.syr.edu (Jerry Peek) writes:
\I use 'su' to access an account that runs csh.  I want the '.logout' file to
\be executed (sourced) when I end the shell.  So, I tried this in '.cshrc':
\        set ignoreeof
\        alias exit 'source ~/.logout; \exit'
\It forces me to use exit to exit.  Typing exit sources ~/.logout, but then says
\        "exit: command not found."

	alias	exit	'source ~/.logout; unalias exit; eval \exit'

...or just use `su -' to obtain a full login shell.
-- 
   creat(2) shouldn't have been create(2): |Maarten Litmaath @ VU Amsterdam:
      it shouldn't have existed at all.    |maart at cs.vu.nl, mcvax!botter!maart



More information about the Comp.unix.questions mailing list