Skip to content

Instantly share code, notes, and snippets.

@JC1738
Created December 23, 2015 17:56
Show Gist options
  • Save JC1738/c49bc599bf1fb70e9cc6 to your computer and use it in GitHub Desktop.
Save JC1738/c49bc599bf1fb70e9cc6 to your computer and use it in GitHub Desktop.
Open new tab run a command in iterm2
#!/usr/bin/env osascript
on run argv
set AppleScript's text item delimiters to {" "}
tell application "iTerm"
make new terminal
tell the current terminal
activate current session
launch session "Default Session"
tell the last session
write text argv as string
end tell
end tell
end tell
end run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment