cd into whatever is the forefront Finder window
cdf() { # short for cdfinder
cd "`osascript -e 'tell app "Finder" to POSIX path of (insertion location as alias)'`"
}
Found it here:
https://github.com/paulirish/dotfiles/blob/master/.functions
Written by Rodolfo Ovalles
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Shell
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#