Created
January 28, 2020 14:10
-
-
Save thadeu/9715f40563dba4b9c18fab114ea49dea to your computer and use it in GitHub Desktop.
This file contains hidden or 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
on run {input, parameters} | |
set paths to "" | |
repeat with i from 1 to length of input | |
set cur to item i of input | |
set paths to paths & " " & quote & POSIX path of cur & quote | |
end repeat | |
set cmd to "vim -p" & paths | |
tell application "iTerm" | |
set created to false | |
if not (exists current window) then | |
create window with profile "Default" | |
set created to true | |
end if | |
tell current window | |
if not created then | |
create tab with profile "Default" | |
end if | |
tell current session | |
activate | |
write text cmd | |
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
MacOs Mojave Version 10.14.6