Skip to content

Instantly share code, notes, and snippets.

@jfeltesse
Forked from jimfisher/rw.zsh
Created October 27, 2013 02:49
Show Gist options
  • Save jfeltesse/7177436 to your computer and use it in GitHub Desktop.
Save jfeltesse/7177436 to your computer and use it in GitHub Desktop.
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