Skip to content

Instantly share code, notes, and snippets.

@tamalw
Created October 1, 2010 15:34
Show Gist options
  • Save tamalw/606358 to your computer and use it in GitHub Desktop.
Save tamalw/606358 to your computer and use it in GitHub Desktop.
function tab () {
CURRENT_RVM=$rvm_ruby_string
osascript 2>/dev/null <<EOF
tell application "System Events"
tell process "Terminal" to keystroke "t" using command down
end
tell application "Terminal"
activate
do script with command "cd $PWD; rvm $CURRENT_RVM; $*" in window 1
end tell
tell application "System Events"
tell process "Terminal" to keystroke "{" using command down
end
EOF
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment