From: Iain Patterson Date: Wed, 26 Aug 2009 10:02:26 +0000 (+0100) Subject: Added -t flag to sshcolourterm. X-Git-Url: http://git.iain.cx/?a=commitdiff_plain;h=402aaf0823df191615b6027ae8289aa7bb78e919;p=profile.git Added -t flag to sshcolourterm. Use -t to set the initial title of the terminal window. --- 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+"$@"}