zsh script launches Terminal.app instead of iTerm.app
I am trying to use the zsh rails workspace launcher for OSX terminal.app
written by Jim Fisher. I am on OSX 10.6.8. I want it to launch in iTerm
but it continues to launch in Terminal. Shell is /bin/zsh
Below is the script that I modifies slightly. Any help is always appreciated!
rails_workspace()
{
osascript -e 'tell application "iTerm.app"' \
-e 'tell application "System Events" to tell process "iTerm.app" 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 "iTerm.app" 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 "iTerm.app" 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
subl .
open "http://localhost:3000"
}
alias rw=rails_workspace
No comments:
Post a Comment