From 402aaf0823df191615b6027ae8289aa7bb78e919 Mon Sep 17 00:00:00 2001 From: Iain Patterson Date: Wed, 26 Aug 2009 11:02:26 +0100 Subject: [PATCH] Added -t flag to sshcolourterm. Use -t to set the initial title of the terminal window. --- opt/bin/sshcolourterm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/opt/bin/sshcolourterm b/opt/bin/sshcolourterm index 8bae4b0..e143a75 100755 --- a/opt/bin/sshcolourterm +++ b/opt/bin/sshcolourterm @@ -2,6 +2,15 @@ SSHCOLOURS=~/.ssh/colours +while getopts ":t:" opt; do + case "$opt" in + t) title="$OPTARG";; + esac +done +shift $((OPTIND-1)) + +[ -z "$title" ] && title="$1" + fqdn=${1##*@} colour= @@ -31,5 +40,5 @@ if [ ! -z "$colour" ]; then fi [ -n "$colour" ] && colour="-bg $colour" -exec ${SSHTERM:-xterm} ${SSHTERM_TITLE:--title} "$1" \ +exec ${SSHTERM:-xterm} ${SSHTERM_TITLE:--title} "$title" \ $colour ${SSHTERM_EXEC:--e} ${SSHTERM_SSH:-ssh} ${1+"$@"} -- 2.20.1