From c43b286e58b8a89896738d23519c580a92dd2cfe Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Mon, 31 Aug 2015 10:29:21 -0500 Subject: [PATCH] * usr/bin/byobu.in: LP: #1369783 - respect user's custom default-command and/or default-shell in the first window launched --- debian/changelog | 3 +++ usr/bin/byobu.in | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 6c3907e6..f6a79809 100644 --- a/debian/changelog +++ b/debian/changelog @@ -20,6 +20,9 @@ byobu (5.95) unreleased; urgency=medium --follow-symlinks when possible (not always available) * usr/lib/byobu/logo: - fix minor logic typo (reversed logic) + * usr/bin/byobu.in: LP: #1369783 + - respect user's custom default-command and/or default-shell + in the first window launched [ Fortunato Ventre ] * usr/lib/byobu/include/constants: diff --git a/usr/bin/byobu.in b/usr/bin/byobu.in index cdac33df..f5c065b4 100755 --- a/usr/bin/byobu.in +++ b/usr/bin/byobu.in @@ -118,7 +118,12 @@ case $BYOBU_BACKEND in fi fi BYOBU_PROFILE="-f $BYOBU_PREFIX/share/$PKG/profiles/tmuxrc" - DEFAULT_WINDOW="new-session -n $BYOBU_WINDOW_NAME ${BYOBU_PREFIX}/bin/byobu-shell" + # Set default window, unless user has overriden + if egrep -qs "default-command|default-shell" $HOME/.$PKG/.tmux.conf >/dev/null 2>&1; then + DEFAULT_WINDOW= + else + DEFAULT_WINDOW="new-session -n $BYOBU_WINDOW_NAME ${BYOBU_PREFIX}/bin/byobu-shell" + fi sessions=$($BYOBU_BACKEND list-sessions 2>/dev/null) || true CUSTOM_WINDOW_SET=0 if [ -s "$BYOBU_CONFIG_DIR/windows.tmux.$BYOBU_WINDOWS" ]; then