Skip to content

Instantly share code, notes, and snippets.

@cristiangrojas
Created December 7, 2018 15:48
Show Gist options
  • Save cristiangrojas/74891ad41c4ca655db322089631e98b1 to your computer and use it in GitHub Desktop.
Save cristiangrojas/74891ad41c4ca655db322089631e98b1 to your computer and use it in GitHub Desktop.
iTerm2 command to open required tabs for my project
function go24 () {
osascript &>/dev/null <<EOF
set commands to {"cd /Users/cristianrojas/www/24mm_react; npm start", "cd /Users/cristianrojas/www/24mm_react; npm test", "cd /Users/cristianrojas/www/24mm_react; git status"}
set commands to commands & {"workon api_24mm; sh run.sh", "workon api_24mm; sh celery.sh", "workon api_24mm; sh beat.sh", "workon api_24mm; git status"}
tell application "iTerm2"
repeat with command in commands
tell current window to create tab with default profile
tell current session of current window to write text command
end repeat
end tell
EOF
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment