At 2008-05-14T19:20:23-05:00, Montag wrote:

> I've got the following in the .bash_profile of a basic user account:
>
> # set prompt [EMAIL PROTECTED]/dir] $ (# for root)
> PS1 = ' [EMAIL PROTECTED] ' 
> case `id -u` in
>       0) PS1='${PS1} # ';; # root
>       *) PS1='${PS1} $ ';; # everyone else

I don't use `bash' much, but that `case' expression is probably
unnecessary.  According to bash(1) [section on "Prompting"], the
special character `$' can be used in prompt-strings:

  "\$     if the effective UID is 0, a #, otherwise a $"

So, something like

  export PS1="[EMAIL PROTECTED] "

in `~/.bashrc' should produce the prompt you want.

Raghavendra.

-- 
N. Raghavendra <[EMAIL PROTECTED]> | http://www.retrotexts.net/
Harish-Chandra Research Institute   | http://www.mri.ernet.in/
See message headers for contact and OpenPGP information.

_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to