From 96f8e5e81bac9f5331c03e64b1a51e742f035b7b Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Thu, 8 Jan 2015 16:00:21 -0600 Subject: [PATCH] * usr/bin/byobu.in: - Don't pollute output with title if calling from script - https://github.com/dustinkirkland/byobu/pull/6 --- debian/changelog | 5 +++++ usr/bin/byobu.in | 10 ++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index b515f200..2f01bbde 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,11 @@ byobu (5.88) unreleased; urgency=medium variables as commands (fish shell being one of those) - Use `sh -c` to explicitly use a POSIX shell to interpret the command + [ dmayle ] + * usr/bin/byobu.in: + - Don't pollute output with title if calling from script + - https://github.com/dustinkirkland/byobu/pull/6 + -- Dustin Kirkland Tue, 30 Sep 2014 08:38:40 -0500 byobu (5.87-0ubuntu1) utopic; urgency=medium diff --git a/usr/bin/byobu.in b/usr/bin/byobu.in index 256d525b..7a2bc245 100755 --- a/usr/bin/byobu.in +++ b/usr/bin/byobu.in @@ -93,10 +93,12 @@ fi # Sanitize the environment byobu-janitor --force -# Set the window title -[ -r "$BYOBU_CONFIG_DIR/statusrc" ] && . "$BYOBU_CONFIG_DIR/statusrc" -. $BYOBU_PREFIX/lib/$PKG/ip_address -[ -n "$BYOBU_NO_TITLE" ] || printf "\033]0;${USER}@$(hostname) ($(__ip_address t)) - ${PKG}\007" +# Set the window title if this is a TTY +if [ -t 1 ]; then + [ -r "$BYOBU_CONFIG_DIR/statusrc" ] && . "$BYOBU_CONFIG_DIR/statusrc" + . $BYOBU_PREFIX/lib/$PKG/ip_address + [ -n "$BYOBU_NO_TITLE" ] || printf "\033]0;${USER}@$(hostname) ($(__ip_address t)) - ${PKG}\007" +fi # Drop a symlink to the ssh socket in $HOME, since we can ensure that exists if [ -S "$SSH_AUTH_SOCK" ] && [ ! -h "$SSH_AUTH_SOCK" ]; then