source $FEISTY_MEOW_SCRIPTS/core/functions.sh
-pruned_host=$(echo $HOSTNAME | sed -e 's/^\([^\.]*\)\..*$/\1/')
-date_string=$(date +"%Y %b %e @ %T")
+# we only label the terminal anew if there's no saved title.
+
+#hmmm: how about putting that title back in place?
+# we currently do this manually in places, like ssh, which is dumb.
-user=$USER
-if [ -z "$user" ]; then
- # try snagging the windoze name.
- user=$USERNAME
-fi
-new_title="-- $user@$pruned_host -- [$date_string]"
+if [ -z "$PRIOR_TERMINAL_TITLE" ]; then
+ pruned_host=$(echo $HOSTNAME | sed -e 's/^\([^\.]*\)\..*$/\1/')
+ date_string=$(date +"%Y %b %e @ %T")
-bash "$FEISTY_MEOW_SCRIPTS/tty/set_term_title.sh" "$new_title"
+ user=$USER
+ if [ -z "$user" ]; then
+ # try snagging the windoze name.
+ user=$USERNAME
+ fi
+
+ new_title="-- $user@$pruned_host -- [$date_string]"
+
+ bash "$FEISTY_MEOW_SCRIPTS/tty/set_term_title.sh" "$new_title"
+fi