From 004590778865a3ec9eb36d2b287ad8610212e584 Mon Sep 17 00:00:00 2001 From: "Fred T. Hamster" Date: Tue, 7 Feb 2017 09:14:27 -0500 Subject: [PATCH] more brains for term check --- scripts/tty/terminal_titler.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/tty/terminal_titler.sh b/scripts/tty/terminal_titler.sh index 66e0c28b..eddfb510 100644 --- a/scripts/tty/terminal_titler.sh +++ b/scripts/tty/terminal_titler.sh @@ -74,13 +74,13 @@ function set_terminal_title() title="$(hostname)" fi - if [ -z "$PS1" ]; then + if [ "${TERM}" != "dumb" -a -z "$PBS_ENVIRONMENT" -a ! -z "$PS1" ]; then + echo -n -e "\033]0;${title}\007" + else # not running interactively, so just echo the title. sep echo ${title} sep - else - echo -n -e "\033]0;${title}\007" fi } -- 2.34.1