Subject: Re: bash prompt
To: None <netbsd-users@NetBSD.org>
From: Leonardo Boiko <leoboiko@conectiva.com.br>
List: netbsd-users
Date: 01/12/2005 17:25:23
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enigB348A353A9E89D331F3EB8C9
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Well, if you want _badly_ to end your prompt with ">" for users and "#"
for root, you could try something like this:
PROMPT_COMMAND='PCHAR=$([ $UID = 0 ] && echo "#" || echo ">")'
export PS1="\u@\h: \w$PCHAR "
I recommend you to just use "\$" though.
--
Leonardo Boiko
--------------enigB348A353A9E89D331F3EB8C9
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFB5ZXHzse6kja2B7QRAnZUAJ9+AagRDoiyrLMGtymqYvKN+vs1awCfT4km
MC6DXHd50TtZaOapYAA7MLA=
=Lb8z
-----END PGP SIGNATURE-----
--------------enigB348A353A9E89D331F3EB8C9--