Path: utzoo!attcan!uunet!mcsun!ukc!warwick!cudcv From: cudcv@warwick.ac.uk (Rob McMahon) Newsgroups: comp.unix.questions Subject: Re: How to alias 'exit' in csh? Message-ID: <209@titania.warwick.ac.uk> Date: 23 Sep 89 10:43:10 GMT References: <770@rodan.acs.syr.edu> <3301@solo9.cs.vu.nl> <38719@bu-cs.BU.EDU> Reply-To: cudcv@warwick.ac.uk (Rob McMahon) Organization: Computing Services, Warwick University, UK Lines: 29 In article <38719@bu-cs.BU.EDU> madd@std.com writes: >Use: > alias exit "source ~/.logout ; 'exit'" >Aliasing doesn't happen on quoted names, which I often make use of when I >really, really want to override my aliasing. I replied to the author, but it occurred to me that this is a useful trick that people might not know. The above doesn't work, because quoting avoids builtins as well as aliases, so it tries to look for a non-builtin command called exit, which it doesn't find. However alias exit "source ~/.logout ; ''exit" does work, it avoids aliases but will still catch builtins. This is useful if someone nasty manages to alias your alias and unalias commands for you (with alias \unalias ... alias \alias ... csh won't normally let you alias alias). You just do ''unalias alias unalias unalias Rob -- UUCP: ...!mcvax!ukc!warwick!cudcv PHONE: +44 203 523037 JANET: cudcv@uk.ac.warwick ARPA: cudcv@warwick.ac.uk Rob McMahon, Computing Services, Warwick University, Coventry CV4 7AL, England