On Mon, 15 Dec 2025, void wrote:

[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} # "


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.

-RVP

Reply via email to