NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: PS1 and other things for superuser
On Mon, 15 Dec 2025 21:34:32 +0000
void <void%f-m.fm@localhost> wrote:
> Ultimately what's required is the prompt is red when it's an account
> with elevated privileges. I can't find a way to do that (yet) with
> NetBSD's /bin/sh. Is there a way without changing the default shell?
Here's how I change the prompt to show elevated privileges:
PS1="$(hostname -s)$ "
[ $(id -u) = 0 ] && PS1="$(hostname -s)# "
export PS1
I use the NetBSD ksh for root as well as for myself.
--
Ted Spradley <tsprad%talent-free-studios.com@localhost>
Home |
Main Index |
Thread Index |
Old Index