On Mon, Dec 15, 2025 at 10:32:02PM +0000, RVP wrote:
The right way to do this in NetBSD's /bin/sh is:
```
set -o promptcmds
PSlit=$(printf '\1')
PS1='$(date +"%a %b %e %H:%M:%S")${PSlit}$(tput bold setaf 1)${PSlit}
$USER@$(hostname) $(pwd) ${PSlit}$(tput sgr0)${PSlit} # '
```
Note that there's no '\n' in that PS1. Don't know how to get a literal '\n'
into PS1.
Thanks for looking.
The lack of '\n' capability puts it all on one line though. I think,
on reflection, I prob shouldn't use root directly for anything and
just use toor instead, and customise that with a more customisable
shell like tcsh or bash or zsh.
I'll need to unlearn 'doas su -' from muscle memory.
Maybe set root shell to /rescue/sh ? Only difference is that the rescue one
is static
--
NetBSD n00b - https://www.f451.online/~void/NetBSD