Created
July 24, 2011 03:30
-
-
Save jimfisher/1102186 to your computer and use it in GitHub Desktop.
zsh rails workspace launcher for OSX terminal.app
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
rails_workspace(){ | |
osascript -e 'tell application "Terminal"' \ | |
-e 'tell application "System Events" to tell process "Terminal" to keystroke "t" using command down' \ | |
-e "do script with command \"cd `pwd`;clear;\" in selected tab of the front window" \ | |
-e "do script with command \"rails server\" in selected tab of the front window" \ | |
-e 'tell application "System Events" to tell process "Terminal" to keystroke "t" using command down' \ | |
-e "do script with command \"cd `pwd`;clear;\" in selected tab of the front window" \ | |
-e "do script with command \"rails console\" in selected tab of the front window" \ | |
-e 'tell application "System Events" to tell process "Terminal" to keystroke "t" using command down' \ | |
-e "do script with command \"cd `pwd`;clear;\" in selected tab of the front window" \ | |
-e "do script with command \"tail -f log/development.log\" in selected tab of the front window" \ | |
-e 'end tell' &> /dev/null | |
sleep 2 | |
mate . | |
open "http://localhost:3000" | |
} | |
alias rw=rails_workspace |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment