How to alias 'exit' in csh?

Jerry Peek jdpeek at rodan.acs.syr.edu
Tue Sep 19 23:50:08 AEST 1989


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."

I read TFM pretty carefully, but all I've come up with is:
        set ignoreeof
        alias exit 'source ~/.logout; kill -9 $$'
which is pretty brutal.  Any better ideas?  This is on a Gould NP-1 running
UTX/32 (BSD4.3-like).  Thanks.

--Jerry Peek; Syracuse University Academic Computing Services; Syracuse, NY
  jdpeek at rodan.acs.syr.edu///JDPEEK at SUVM.BITNET///GEnie: J.PEEK1
  +1 315 443-3995



More information about the Comp.unix.questions mailing list