source "$FEISTY_MEOW_SCRIPTS/core/common.alias"
# uncomment this to get extra noisy debugging.
-export DEBUG_TERM_TITLE=true
+#export DEBUG_TERM_TITLE=true
##############
else
# not running interactively, so just echo the title.
sep
- echo ${title}
+ echo "${title}"
sep
fi
}
local title="$*"
if [ -z "$title" ]; then
-echo "empty title: pushing current title again"
+ if [ ! -z "$DEBUG_TERM_TITLE" ]; then
+ echo "terminal_titler: empty title: pushing current title again"
+ fi
peek_title_stack
title="$LAST_TITLE"
if [ -z "$title" ]; then
- echo "there was no saved title, so we're ignoring the save attempt."
+ log_feisty_meow_event "terminal_titler: there was no saved title, so we're ignoring the save attempt."
return 1
fi
fi
export TERMINAL_TITLE_STACK="$TERMINAL_TITLE_STACK,\"$title\""
fi
-echo new terminal title stack is:
-echo $TERMINAL_TITLE_STACK
+ if [ ! -z "$DEBUG_TERM_TITLE" ]; then
+ echo "terminal_titler: new terminal title stack is:"
+ echo "$TERMINAL_TITLE_STACK"
+ fi
}
# takes a terminal title off the stack and sets the LAST_TITLE variable.
if [ ! -z "$LAST_TITLE" ]; then
if [ ! -z "$DEBUG_TERM_TITLE" ]; then
- echo "restoring prior terminal title of '$LAST_TITLE'"
- echo "while new title stack is: $TERMINAL_TITLE_STACK"
+ echo "terminal_titler: restoring prior terminal title of '$LAST_TITLE'"
+ echo "terminal_titler: while new title stack is: $TERMINAL_TITLE_STACK"
fi
apply_title_to_terminal "$LAST_TITLE"
fi
# we only label the terminal anew if there's no saved title.
if [ -z "$TERMINAL_TITLE_STACK" ]; then
if [ ! -z "$DEBUG_TERM_TITLE" ]; then
- echo "showing new generated title since prior title was empty"
+ echo "terminal_titler: showing new generated title since prior title was empty"
fi
pruned_host=$(echo $HOSTNAME | sed -e 's/^\([^\.]*\)\..*$/\1/')
date_string=$(date +"%Y %b %e @ %T")