我正在尝试使用由 Jim Fisher 编写的 OSX terminal.app 的 zsh rails 工作区启动器。我在 OSX 10.6.8 上。我希望它在 iTerm 中启动,但它继续在终端中启动。外壳是 /bin/zsh
下面是我稍微修改的脚本。任何帮助都将受到赞赏!
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