X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Ftty%2Fterminal_titler.sh;h=f4a18282bac6fd7e2212c4726044e60f2bb4ba82;hb=91144ef11b2aff0939c57c00badcd642d84931f8;hp=329ec57c7664fc563dddba10e2f0b2c7754b0fa3;hpb=8c79bd1eca320d74afede4d1089283b563a02b68;p=feisty_meow.git diff --git a/scripts/tty/terminal_titler.sh b/scripts/tty/terminal_titler.sh index 329ec57c..f4a18282 100644 --- a/scripts/tty/terminal_titler.sh +++ b/scripts/tty/terminal_titler.sh @@ -72,7 +72,15 @@ function set_terminal_title() if [ -z "${title}" ]; then title="$(hostname)" fi - echo -n -e "\033]0;${title}\007" + + if [ -z "$PS1" ]; then + # not running interactively, so just echo the title. + sep + echo ${title} + sep + else + echo -n -e "\033]0;${title}\007" + fi } # reads the current terminal title, if possible, and saves it to our stack of titles.