Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!haven!adm!smoke!ibd!heilpern From: heilpern@ibd.BRL.MIL (Mark A. Heilpern ) Newsgroups: comp.unix.questions Subject: Re: how can .cshrc know if session is a login? Message-ID: <264@ibd.BRL.MIL> Date: 22 May 89 12:34:14 GMT References: <434ccc08.bea3@mach1.engin.umich.edu> <14551@duke.cs.duke.edu> <31552@bu-cs.BU.EDU> Reply-To: heilpern@brl.arpa (Mark A. Heilpern (IBD) ) Distribution: na Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 21 In article <31552@bu-cs.BU.EDU> madd@bu-it.bu.edu (Jim Frost) writes: > if ($?SUBSHELL) then > alias % exit > alias fg exit > else > alias % echo No current job. --> alias fg echo No current job. > setenv SUBSHELL "yes" > endif --> alias bg echo "Open the pod bay doors HAL. I can't do that, Dave" **>Just aliasing "%" and "fg" to "exit" has the annoying habit of logging >you out. Yes, Jim, but by alias-ing fg and bg to 'echo' statements, as in the arrowed lines, you are removing the ability to get back to any suspended jobs stopped with the use of control-Z. (Try it, it works :) --M.