I needed a quick way to grab the path from the front most finder window.
alias cf=copy_finder_window_path
function copy_finder_window_path() {
osascript <<END
tell application "Finder"
set the_folder to (the target of the front window) as alias
set the_path to (get POSIX path of the_folder)
set the clipboard to the_path as text
end tell
END
}
alias gf="cf && cd \`pbpaste\` && clear && pwd"