Skip to content

Instantly share code, notes, and snippets.

@marzocchi
Last active August 29, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marzocchi/786bd06cf3bfd7831dcf to your computer and use it in GitHub Desktop.
Save marzocchi/786bd06cf3bfd7831dcf to your computer and use it in GitHub Desktop.
attempt to get an iTerm2 tab by its tty
tell application "iTerm"
set tt to sessions of tabs of terminal windows whose tty is equal to "/dev/ttys001"
-- result is this nested list:
-- {{{select 1 of select 1 of application "iTerm"}}}
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment