projects
/
feisty_meow.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8c79bd1
)
do not emit term codes if not term
author
Chris Koeritz
<fred@gruntose.com>
Tue, 7 Feb 2017 13:16:43 +0000
(08:16 -0500)
committer
Chris Koeritz
<fred@gruntose.com>
Tue, 7 Feb 2017 13:16:43 +0000
(08:16 -0500)
scripts/tty/terminal_titler.sh
patch
|
blob
|
history
diff --git
a/scripts/tty/terminal_titler.sh
b/scripts/tty/terminal_titler.sh
index 329ec57c7664fc563dddba10e2f0b2c7754b0fa3..f4a18282bac6fd7e2212c4726044e60f2bb4ba82 100644
(file)
--- 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.