Skip to content

Instantly share code, notes, and snippets.

@xenatt
Last active December 16, 2015 16:19
Show Gist options
  • Save xenatt/5462529 to your computer and use it in GitHub Desktop.
Save xenatt/5462529 to your computer and use it in GitHub Desktop.
Finder To Terminal License GPL
try
tell application "Finder" to set fdir to (target of front Finder window) as text
tell application "Terminal"
do script "cd " & (quoted form of POSIX path of fdir)
end tell
tell application "System Events"
set visible of process "Terminal" to true
set frontmost of process "Terminal" to true
end tell
on error errorMessage number errorNumber
log ("errorMessage: " & errorMessage & ", errorNumber: " & errorNumber)
end try
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment