Created
November 5, 2017 12:19
-
-
Save soichisumi/c9c0761951b86f68b51a7afca8de7d1e to your computer and use it in GitHub Desktop.
Script to open iTerm2 and
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
function run(input, parameters) { | |
// open iterm2 and retrieve session object | |
var iTerm = Application("iTerm2"); | |
var win = iTerm.createWindowWithDefaultProfile(); | |
var tab = win.currentTab(); | |
var ses = tab.currentSession(); | |
//run command in the session | |
ses.write({text: "echo yoyo"}); | |
return ""; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment