Skip to content

Instantly share code, notes, and snippets.

@jish
Created January 28, 2011 17:35
Show Gist options
  • Select an option

  • Save jish/800608 to your computer and use it in GitHub Desktop.

Select an option

Save jish/800608 to your computer and use it in GitHub Desktop.
change_iterm_colors() {
osascript -e "tell application \"iTerm\"\
to tell the current terminal\
to tell the current session\
to set the background color to \"$1\""
osascript -e "tell application \"iTerm\"\
to tell the current terminal\
to tell the current session\
to set the foreground color to \"$2\""
}
ssh() {
change_iterm_colors blue white
/usr/bin/ssh "$@"
change_iterm_colors white black
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment