Last active
April 15, 2019 14:26
-
-
Save Nappp/2f921bf6eee9410655b89dd668d33daf to your computer and use it in GitHub Desktop.
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
tell application "iTerm" | |
set isRunning to (application "iTerm" is running) | |
activate | |
tell current window | |
if (count of tabs) < 1 then | |
create window with default profile | |
set isRunning to false | |
end if | |
if isRunning then | |
set newTab to (create tab with default profile) | |
tell newTab | |
select | |
end tell | |
end if | |
tell current session | |
write text "cd /which/ever/path/you/want" | |
end tell | |
end tell | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment