* etc/profile.d/Z97-byobu.sh, usr/bin/byobu-launcher: LP: #897711

- allow nesting, if LC_BYOBU > 1
This commit is contained in:
Dustin Kirkland 2012-01-15 11:44:18 -06:00
commit bdfa4500aa
3 changed files with 10 additions and 4 deletions

2
debian/changelog vendored
View file

@ -24,6 +24,8 @@ byobu (5.3) unreleased; urgency=low
rather than one or the other
* etc/profile.d/Z97-byobu.sh:
- support LC_TERMTYPE=[byobu|byobu-screen|byobu-tmux]
* etc/profile.d/Z97-byobu.sh, usr/bin/byobu-launcher: LP: #897711
- allow nesting, if LC_BYOBU > 1
[ Dustin Kirkland and Ryan Thompson ]
* usr/bin/byobu-reconnect-sockets, usr/bin/byobu-select-session: LP: #908944

View file

@ -20,7 +20,7 @@
# Apologies for borrowing the LC_BYOBU namespace, but:
# a) it's reasonable to assume that no one else is using LC_BYOBU
# b) LC_* is sent and receieved by most /etc/ssh/ssh*_config
if [ "$LC_BYOBU" = "1" ] && [ -r "/usr/bin/byobu-launch" ]; then
if [ -n "$LC_BYOBU" ] && [ "$LC_BYOBU" -gt 0 ] && [ -r "/usr/bin/byobu-launch" ]; then
. /usr/bin/byobu-launch
elif [ "$LC_TERMTYPE" = "byobu" ] && [ -r "/usr/bin/byobu-launch" ]; then
. /usr/bin/byobu-launch

View file

@ -29,9 +29,13 @@ if [ -O "$HOME" ]; then
else
case "$TERM" in
*screen*)
# Handle nesting (silence this message, as some users found it noisy?)
# printf "$(gettext 'To launch in a nested session, run: byobu')\n"
true
# Handle nesting
if [ -n "$LC_BYOBU" ] && [ "$LC_BYOBU" -gt 1 ]; then
# LC_BYOBU > 1, so user explicitly wants nested sessions
exec $BYOBU_PREFIX/bin/byobu "$@"
else
true
fi
;;
dumb)
# Dumb terminal, don't launch