Created
February 27, 2015 15:51
-
-
Save chongkim/8fb72d3ac9b142bc9976 to your computer and use it in GitHub Desktop.
script to send commands to iTerm and go back to MacVim
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/osascript | |
on run argv | |
tell application "iTerm" | |
if (count of terminals) = 0 then | |
set _terminal to (make new terminal) | |
else | |
set _terminal to current terminal | |
end if | |
activate | |
tell _terminal | |
tell the last session | |
set AppleScript's text item delimiters to " " | |
write text "" & argv | |
set AppleScript's text item delimiters to "" | |
end tell | |
end tell | |
end tell | |
delay 0.02 | |
tell application "MacVim" | |
activate | |
end tell | |
end run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment