Skip to content

Instantly share code, notes, and snippets.

@reynaldobarrosjr
Last active February 21, 2018 11:56
Show Gist options
  • Select an option

  • Save reynaldobarrosjr/c3c868fa8acf8b06de91a4bf7422b0cc to your computer and use it in GitHub Desktop.

Select an option

Save reynaldobarrosjr/c3c868fa8acf8b06de91a4bf7422b0cc to your computer and use it in GitHub Desktop.
Apple script que abre o terminal em uma pasta especificada por uma ação anterior no Automator.
on run {input, parameters}
tell application "Terminal"
activate
if (the (count of the window) = 0) or ¬
(the busy of window 1 = true) then
tell application "System Events"
keystroke "n" using command down
end tell
end if
do script "cd \"" & (POSIX path of ¬
(input as string)) & "\"" in window 1
end tell
return input
end run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment