mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 14:24:39 -07:00
* usr/bin/byobu: LP: #949385
- namespace a few environment variables more appropriately
This commit is contained in:
parent
111a2d8f43
commit
4299f72d7b
2 changed files with 11 additions and 9 deletions
2
debian/changelog
vendored
2
debian/changelog
vendored
|
@ -6,6 +6,8 @@ byobu (5.16) unreleased; urgency=low
|
||||||
* usr/lib/byobu/reboot_required, usr/lib/byobu/updates_available:
|
* usr/lib/byobu/reboot_required, usr/lib/byobu/updates_available:
|
||||||
- powersave flag and reload flag suffered from the same problem
|
- powersave flag and reload flag suffered from the same problem
|
||||||
as LP: #942469
|
as LP: #942469
|
||||||
|
* usr/bin/byobu: LP: #949385
|
||||||
|
- namespace a few environment variables more appropriately
|
||||||
|
|
||||||
-- Dustin Kirkland <kirkland@ubuntu.com> Thu, 23 Feb 2012 15:01:55 -0600
|
-- Dustin Kirkland <kirkland@ubuntu.com> Thu, 23 Feb 2012 15:01:55 -0600
|
||||||
|
|
||||||
|
|
|
@ -99,7 +99,7 @@ case $BYOBU_BACKEND in
|
||||||
[ -z "$SCREEN_TERM" ] && SCREEN_TERM="-2"
|
[ -z "$SCREEN_TERM" ] && SCREEN_TERM="-2"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
PROFILE="-f $BYOBU_PREFIX/share/$PKG/profiles/tmuxrc"
|
BYOBU_PROFILE="-f $BYOBU_PREFIX/share/$PKG/profiles/tmuxrc"
|
||||||
sessions=$($BYOBU_BACKEND list-sessions 2>/dev/null) || true
|
sessions=$($BYOBU_BACKEND list-sessions 2>/dev/null) || true
|
||||||
;;
|
;;
|
||||||
screen)
|
screen)
|
||||||
|
@ -127,14 +127,14 @@ case $BYOBU_BACKEND in
|
||||||
# Some users want to maintain separate configurations
|
# Some users want to maintain separate configurations
|
||||||
# if they use both GNU Screen and byobu on the same system
|
# if they use both GNU Screen and byobu on the same system
|
||||||
if [ -r "$BYOBU_CONFIG_DIR/.screenrc" ]; then
|
if [ -r "$BYOBU_CONFIG_DIR/.screenrc" ]; then
|
||||||
PROFILE="-c $BYOBU_PREFIX/share/$PKG/profiles/byoburc"
|
BYOBU_PROFILE="-c $BYOBU_PREFIX/share/$PKG/profiles/byoburc"
|
||||||
else
|
else
|
||||||
PROFILE="-c $BYOBU_PREFIX/share/$PKG/profiles/screenrc"
|
BYOBU_PROFILE="-c $BYOBU_PREFIX/share/$PKG/profiles/screenrc"
|
||||||
fi
|
fi
|
||||||
NAME="-S $PKG"
|
BYOBU_SESSION_NAME="-S $PKG"
|
||||||
# Zero out $NAME if user has specified a session name
|
# Zero out $BYOBU_SESSION_NAME if user has specified a session name
|
||||||
for i in "$@"; do
|
for i in "$@"; do
|
||||||
case $i in -*r*|-*d*|-*D*|-*S*|-ls|-list) NAME= ;; esac
|
case $i in -*r*|-*d*|-*D*|-*S*|-ls|-list) BYOBU_SESSION_NAME= ;; esac
|
||||||
done
|
done
|
||||||
sessions=$($BYOBU_BACKEND -wipe 2>/dev/null) || true
|
sessions=$($BYOBU_BACKEND -wipe 2>/dev/null) || true
|
||||||
;;
|
;;
|
||||||
|
@ -148,7 +148,7 @@ esac
|
||||||
if [ "$#" = "0" ]; then
|
if [ "$#" = "0" ]; then
|
||||||
if [ "$CUSTOM_WINDOW_SET" = "1" ]; then
|
if [ "$CUSTOM_WINDOW_SET" = "1" ]; then
|
||||||
# Start new custom window set session
|
# Start new custom window set session
|
||||||
exec $BYOBU_BACKEND $SCREEN_TERM $NAME $PROFILE
|
exec $BYOBU_BACKEND $SCREEN_TERM $BYOBU_SESSION_NAME $BYOBU_PROFILE
|
||||||
else
|
else
|
||||||
case "$sessions" in
|
case "$sessions" in
|
||||||
*\(*\)*)
|
*\(*\)*)
|
||||||
|
@ -157,13 +157,13 @@ if [ "$#" = "0" ]; then
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
# Start new default session
|
# Start new default session
|
||||||
exec $BYOBU_BACKEND $SCREEN_TERM $NAME $PROFILE $DEFAULT_WINDOW
|
exec $BYOBU_BACKEND $SCREEN_TERM $BYOBU_SESSION_NAME $BYOBU_PROFILE $DEFAULT_WINDOW
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
# Launch with command line args
|
# Launch with command line args
|
||||||
exec $BYOBU_BACKEND $SCREEN_TERM $NAME $PROFILE "$@"
|
exec $BYOBU_BACKEND $SCREEN_TERM $BYOBU_SESSION_NAME $BYOBU_PROFILE "$@"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# vi: syntax=sh ts=4 noexpandtab
|
# vi: syntax=sh ts=4 noexpandtab
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue