Created
June 28, 2010 20:19
-
-
Save masnick/456304 to your computer and use it in GitHub Desktop.
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
# Put this in your ~/.bash_profile file | |
# To reload the .bash_profile without restarting Terminal, run "source ~/.bash_profile" | |
# http://stackoverflow.com/questions/420456/open-terminal-here-in-mac-os-finder | |
function ff { osascript -e 'tell application "Finder"'\ | |
-e "if (${1-1} <= (count Finder windows)) then"\ | |
-e "get POSIX path of (target of window ${1-1} as alias)"\ | |
-e 'else' -e 'get POSIX path of (desktop as alias)'\ | |
-e 'end if' -e 'end tell'; };\ | |
function cdff { cd "`ff $@`" && pwd; }; | |
function pwdff { echo "`ff $@`" | pbcopy; }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment