From: Fred T. Hamster Date: Tue, 7 Feb 2017 14:14:27 +0000 (-0500) Subject: more brains for term check X-Git-Tag: 2.140.90~216 X-Git-Url: https://feistymeow.org/gitweb/?a=commitdiff_plain;h=004590778865a3ec9eb36d2b287ad8610212e584;p=feisty_meow.git more brains for term check --- 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 }