Info on BRL shell

The Beach Bum jfh at rpp386.Dallas.TX.US
Sat Sep 24 08:45:44 AEST 1988


hpsal2:comp.unix.wizards / roy at phri.UUCP (Roy Smith) / 11:48 am  Sep 21, 1988 /
>davidsen at crdos1.UUCP (bill davidsen) writes:
>> Please tell me that I'm not the only one who feels competent to decide
>> how I set my prompt, for root or anyone else.
>
>	Sorry Bill, but I agree that putting a '#' at the end of the
>superuser prompt is A Good Thing.  I've often got a half dozen shells
>running in different windows; it's nice to be reminded which of them has
>been superuserized.

there are many ways to have your prompt indicate you are root.  here is
my C shell .cshrc approximation:

setenv LOGNAME `id | sed -e 's/[^(]*(\([^)]*\).*/\1/'`
setenv NAME 'The Beach Bum'
setenv ORGANIZATION 'HASA, "S" Division'
if ( $LOGNAME != root ) then
	set prompt="\! - `uuname -l`-> "
else
	set prompt="\! - #`uuname -l`-> "
endif

i like the -> on the end because it is very recognizable to me.  and the
'#' is there as well.  i can tell if i am in a login shell by pressing
^D and seeing what i am supposed to do to "exit" or "logout" of the current
C shell [ i run with ignoreeof set ]
-- 
John F. Haugh II (jfh at rpp386.Dallas.TX.US)                   HASA, "S" Division

      "Why waste negative entropy on comments, when you could use the same
                   entropy to create bugs instead?" -- Steve Elias



More information about the Comp.unix.wizards mailing list