Skip to content

Instantly share code, notes, and snippets.

@soichisumi
Created November 5, 2017 12:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save soichisumi/c9c0761951b86f68b51a7afca8de7d1e to your computer and use it in GitHub Desktop.
Save soichisumi/c9c0761951b86f68b51a7afca8de7d1e to your computer and use it in GitHub Desktop.
Script to open iTerm2 and
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