Created
April 7, 2011 13:02
-
-
Save rpetrich/907740 to your computer and use it in GitHub Desktop.
Changes the terminal settings when calling SSH
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
function tabc { | |
NAME=$1; if [ -z "$NAME" ]; then NAME="Default"; fi | |
osascript -e "tell application \"Terminal\" to set current settings of front window to settings set \"$NAME\"" | |
} | |
function ctrl_c() { | |
tabc "Visor" | |
exit -1 | |
} | |
trap ctrl_c INT | |
tabc "Visor SSH" | |
/usr/bin/ssh $* | |
STATUS=$? | |
tabc "Visor" | |
exit $STATUS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment