Path: utzoo!mnetor!tmsoft!torsqnt!jarvis.csri.toronto.edu!rutgers!apple!brutus.cs.uiuc.edu!psuvax1!psuvm!cunyvm!nyser!rodan!rodan.acs.syr.edu!jdpeek From: jdpeek@rodan.acs.syr.edu (Jerry Peek) Newsgroups: comp.unix.questions Subject: How to alias 'exit' in csh? Message-ID: <770@rodan.acs.syr.edu> Date: 19 Sep 89 13:50:08 GMT Sender: jdpeek@rodan.acs.syr.edu Reply-To: jdpeek@rodan.acs.syr.edu (Jerry Peek) Organization: Syracuse University, Syracuse, NY Lines: 16 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@rodan.acs.syr.edu///JDPEEK@SUVM.BITNET///GEnie: J.PEEK1 +1 315 443-3995