3 # wraps our calling the secure shell and lets us pick our credentials.
5 source "$FEISTY_MEOW_GENERATED/custom/scripts/pick_credentials.sh"
7 # save the former terminal title if we're running in X with xterm.
9 if [ "$TERM" == "xterm" ]; then
10 prior_title="$(xprop -id $WINDOWID | perl -nle 'print $1 if /^WM_NAME.+= \"(.*)\"$/')"
13 # force the TERM variable to a more generic version for other side.
14 # we don't want the remote side still thinking it's running xterm.
17 #hmmm: it would be good to set an interrupt handler here and
18 # trap ctrl-c, since otherwise we are getting exited from and losing a chance
19 # to reset the terminal title. this actually happens a lot, since some X11
20 # or other background process is left running and the ssh never actually quits,
21 # forcing one to hit ctrl-c.
23 if [ ! -z "$keyfile" ]; then
24 \ssh -i "$keyfile" -X -C -c blowfish-cbc $*
26 \ssh -X -C -c blowfish-cbc $*
30 # we don't want to emit anything extra if this is being driven by git.
31 if [ -z "$(echo $* | grep git)" ]; then
32 # re-run the terminal labeller after coming back from ssh.
33 # we check the exit value because we don't want to update this for a failed connection.
34 if [ -z "$prior_title" ]; then
35 bash $FEISTY_MEOW_SCRIPTS/tty/label_terminal_with_infos.sh
37 bash $FEISTY_MEOW_SCRIPTS/tty/set_term_title.sh "$prior_title"