開いているFinderの場所にターミナルで移動するcdfコマンド

今まで$cd + Drag dropで移動していたのでこれは便利
http://brettterpstra.com/2013/02/09/quick-tip-jumping-to-the-finder-location-in-terminal/
~/.zshrc

# cd to the path of the front Finder window
cdf() {
	target=`osascript -e 'tell application "Finder" to if (count of Finder windows) > 0 then get POSIX path of (target of front Finder window as text)'`
	if [ "$target" != "" ]; then
		cd "$target"; pwd
	else
		echo 'No Finder window found' >&2
	fi
}