Skip to content

Instantly share code, notes, and snippets.

@pasela
Last active May 18, 2022 20:34
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 pasela/6051206 to your computer and use it in GitHub Desktop.
Save pasela/6051206 to your computer and use it in GitHub Desktop.
[alfred] Open ssh in iTerm (Alfred Workflow)
tell application "iTerm"
activate
tell the first terminal
set ssh_session to (make new session at end of sessions)
tell ssh_session
exec command "ssh {query}"
end tell
end tell
end tell
@pasela
Copy link
Author

pasela commented Jul 22, 2013

  1. Add new workflow Templates -> Essentials -> Keyword to Script
  2. Edit Keyword
    1. Set Keyword to "ssh"
    2. Check with space and select Argument Required
    3. Set the title and subtext
  3. Edit Run Script
    1. Set Language to "/usr/bin/osascript"
    2. Check all of Escaping
    3. Copy this script and paste it into Script area

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment