Created
August 31, 2016 13:05
-
-
Save chew-z/c06a355e72a4d3aaf9a701fe796770b0 to your computer and use it in GitHub Desktop.
open current folder in Finder
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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