Created
December 23, 2015 18:18
-
-
Save JC1738/f15c8f70a7d448f91510 to your computer and use it in GitHub Desktop.
open new tmux session on new tab in iterm2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env osascript | |
on run argv | |
set AppleScript's text item delimiters to {" "} | |
set newpath to "cd " & argv | |
set tmuxstring to "tmux attach -t base || tmux new -s base" | |
tell application "iTerm" | |
make new terminal | |
tell the current terminal | |
activate current session | |
launch session "Default Session" | |
tell the last session | |
write text newpath as string | |
end tell | |
tell the last session | |
write text tmuxstring 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