how can .cshrc know if session is a login?
Mark A. Heilpern
heilpern at ibd.BRL.MIL
Mon May 22 22:34:14 AEST 1989
In article <31552 at bu-cs.BU.EDU> madd at 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.
More information about the Comp.unix.questions
mailing list