projects
/
feisty_meow.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
new fortune
[feisty_meow.git]
/
scripts
/
tty
/
terminal_titler.sh
diff --git
a/scripts/tty/terminal_titler.sh
b/scripts/tty/terminal_titler.sh
index e4262498080b5f89d688d2efbd15c2fa00985e65..eddfb510ebd686336f74491b212b4b518a3317d8 100644
(file)
--- a/
scripts/tty/terminal_titler.sh
+++ b/
scripts/tty/terminal_titler.sh
@@
-1,6
+1,7
@@
#!/bin/bash
#!/bin/bash
-source $FEISTY_MEOW_SCRIPTS/core/functions.sh
+source "$FEISTY_MEOW_SCRIPTS/core/functions.sh"
+source "$FEISTY_MEOW_SCRIPTS/core/common.alias"
# just saying this is an array...
#declare -a PRIOR_TERMINAL_TITLES
# just saying this is an array...
#declare -a PRIOR_TERMINAL_TITLES
@@
-72,7
+73,15
@@
function set_terminal_title()
if [ -z "${title}" ]; then
title="$(hostname)"
fi
if [ -z "${title}" ]; then
title="$(hostname)"
fi
- echo -n -e "\033]0;${title}\007"
+
+ 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
+ fi
}
# reads the current terminal title, if possible, and saves it to our stack of titles.
}
# reads the current terminal title, if possible, and saves it to our stack of titles.