Skip to content

Instantly share code, notes, and snippets.

@excenter
Created October 10, 2017 20:23
Show Gist options
  • Save excenter/e05afde42111cc426388b6d4e66e4039 to your computer and use it in GitHub Desktop.
Save excenter/e05afde42111cc426388b6d4e66e4039 to your computer and use it in GitHub Desktop.
How to open a new iTerm window, and execute arbitrary commands.
tell application "iTerm"
activate
create window with default profile
tell current session of current window
write text "say exporting path; export PWD=~/Developer/Content/NG1/NW; say opening atom; atom $PWD; say opening sourcetree; stree $PWD; say end;"
end tell
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment