Skip to content

Instantly share code, notes, and snippets.

@voodooGQ
Created December 4, 2013 15:49
Show Gist options
  • Save voodooGQ/7789859 to your computer and use it in GitHub Desktop.
Save voodooGQ/7789859 to your computer and use it in GitHub Desktop.
CD to current finder window
# Place in your ~/.bash_profile
# cd to current finder window
function cdfinder()
{
cd "$(osascript -e 'tell application "Finder"' \
-e 'set myname to POSIX path of (target of window 1 as alias)' \
-e 'end tell' 2>/dev/null)"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment