Created
December 4, 2013 15:49
-
-
Save voodooGQ/7789859 to your computer and use it in GitHub Desktop.
CD to current finder window
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
# 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