Skip to content

Instantly share code, notes, and snippets.

@chew-z
Created August 31, 2016 13:05
Show Gist options
  • Save chew-z/c06a355e72a4d3aaf9a701fe796770b0 to your computer and use it in GitHub Desktop.
Save chew-z/c06a355e72a4d3aaf9a701fe796770b0 to your computer and use it in GitHub Desktop.
open current folder in Finder
#!/usr/bin/env zsh
# open current folder in Finder
osascript -e'on run {arg}
set the_folder to POSIX file (POSIX path of arg)
tell application "Finder"
activate
if exists window 1 then
set target of window 1 to the_folder
else
open the_folder
end if
end tell
end run' "$(pwd)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment