Package: dash Version: 0.5.11+git20210120+802ebd4-1 Severity: normal
Hey. Not sure wheter this is a bug, but at least it feels wrong ;-) It seems that dash sets PS1 on non-interactive shells (regardless of whether login- or non-login-shells). I basically use the default /etc/profile and ~/.profile provided by base-files. These do not seem to set PS1, but they do source /etc/bash.bashrc and ~/.basrh, which however exit out when the shell is non-interactive. So AFAIU, it cannot be set by those. Now taking a little test script test.sh: set -u echo $PS1 gives: calestyo@heisenberg:~$ dash test.sh $ calestyo@heisenberg:~$ dash -l test.sh $ calestyo@heisenberg:~$ bash test.sh test.sh: line 2: PS1: unbound variable calestyo@heisenberg:~$ bash -l test.sh test.sh: line 2: PS1: unbound variable I would expect that non-interactive shells should not have PS1 set? Especially this also leads to stuff from the various profile files to be excuted, that should not, because e.g. /etc/profile tests interactiveness based on PS1. Cheers, Chris