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
#cd into directory in Finder's front window | |
function cdf() { | |
finderPath=`osascript -e 'try | |
tell application "Finder" to set the source_folder to (folder of the front window) as alias | |
on error | |
tell application "Finder" to set source_folder to insertion location as alias | |
end try | |
return POSIX path of source_folder as string'` | |
cd "$finderPath" |