Created
May 4, 2016 05:12
-
-
Save jostyee/609d2c3aa832533c608d560d5074889f to your computer and use it in GitHub Desktop.
This file contains 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
function cdf() # cd to Finder's front window's path | |
{ | |
path="`osascript -e 'tell application "Finder" to set myname to POSIX path of (target of window 1 as alias)' 2>/dev/null`" | |
if [ -n "$path" ]; then | |
echo "cd to $path" | |
cd "$path" | |
else | |
echo "no Finder window found" | |
fi | |
} | |
function fcd() # open current terminal path in Finder | |
{ | |
open -a Finder ./ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment