Oh joy, a bug in the work-around (and no way to edit the post).
Please add "-a" to the egrep command line to avoid a warning due to the nul
terminator in cmdline.
CORRECTED work-around for .bashrc :
i_am_toplevel() {
case "$SHLVL" in
1) return 0 ;;
3) return 1 ;;
2) # HACK FOR Ubuntu 16.10, 17.04 ... where SHLVL=2 at top
if egrep -as '(terminal-server|^xterm)' /proc/$PPID/cmdline ; then
return 0
fi
;;
esac
return 1
}
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1707977
Title:
SHLVL=2 in outermost shell in unity terminals (REGRESSION)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/unity/+bug/1707977/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs