#!/bin/bash
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
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.