Skip to content

Instantly share code, notes, and snippets.

@maxrothman
Created January 8, 2015 17:41
Show Gist options
  • Save maxrothman/af71ff2cef2a04f69384 to your computer and use it in GitHub Desktop.
Save maxrothman/af71ff2cef2a04f69384 to your computer and use it in GitHub Desktop.
iTerm2 nightly build integration with Alfred
-- The nightly builds of iTerm have changed its AppleScript API, which breaks Alfred's default iTerm integration.
-- The new API examples are here: https://iterm2.com/applescript.html
-- Discussion about it and support can be found here: https://groups.google.com/forum/#!msg/iterm2-discuss/PcMGixwuceY/81JMZheXb_UJ
--Simply paste this into the box under Alfred Preferences > Terminal/Shell > Application: Custom
on alfred_script(q)
tell application "iTerm"
create window with default profile
tell current session of last terminal window
write text q & "; clear"
end tell
end tell
end alfred_script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment