I have a PS1 which shows the SHLVL if it's not 1 to quickly see if I'm in a subshell. This works as expected when using GNOME, but when I spawn a new terminal in Awesome WM (Mod4+Return) it always starts with SHLVL=2 or higher. Is this normal?
This is directly related to the number of times I have restarted Awesome (Mod4+Ctrl+r or pkill -HUP awesome). Is there some way to avoid spawning new shells when restarting?
These commits seem to be relevant, since Awesome ends up running something like $SHELL -c ... on HUP, but I don't know enough C to fix it.
My /bin/sh is dash and my login shell is bash.