Hi,

I wanted to set PS1 for root so it looked something like this

https://www.f451.online/~void/NetBSD/img/rootprompt-example-openbsd.img

it sort of works [0] but it looks like this

https://www.f451.online/~void/NetBSD/img/rootprompt-example-netbsd10.1.png

The first problem is, when I thought about it was I'm modifying the prompt for
root and technically maybe I really shouldnt do that. because the sub-problem
here is that in order to make the prompt work I needed to set it to openbsd's
ksh (oksh) shell instead of the default. So I looked at toor account thinking
I might use that but unlike other BSDs, on Net the toor shell is set
to /rescue/sh so maybe that shouldn't be modified either.

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?

[0] I don't know why the host is echoed first either. It looks like this in
    ~/.profile:
    RED="\033[1;37;41m"
    RESET="\033[0;0m"
    export PS1="\n\d \t\n${RED}\u@\h \w ${RESET} # "

--
NetBSD n00b - https://www.f451.online/~void/NetBSD

Reply via email to