I just upgraded to Ubuntu 16.10. Why does $SHLVL now start with a value of 2 when I open the Gnome terminal? This was not the case in 16.04.
|
|
|||||
|
|
This unfortunate bug was introduced in Ubuntu 16.10. For a bash work-around, see https://bugs.launchpad.net/ubuntu/+source/unity/+bug/1707977/comments/3 |
||||
|
|
|
If you run an application that does not start a shell, but can give you access to the environment variables, you'll see that the environment already contains Now, However, the consoles/TTYs still have a |
|||
|
|
|
Following up from my comment in the original question (and, this is not an answer per se, since I can't answer "why", but I can verify the new behavior exists): This change breaks backward compatibility. Now, no matter how you open a terminal/bash in ubuntu, they all start at (Also, I'm not sure if In experimenting with ways to try to deduce the true SHLVL, trying to see if there is another way to tell a "parent" vs subshell, this might work (checking for ubuntu is optional, if this is in fact a Unity-specific
This |
|||
|
|
|
It doesn't really, One can track the progress of
|
|||||||||||||||||
|