Created
August 24, 2013 23:34
-
-
Save msridhar/6331017 to your computer and use it in GitHub Desktop.
Aliases for a command cpth that, given a relative path to a file, gets the absolute path and copies it to the Mac clipboard
This file contains hidden or 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
alias realpath="python -c \"import os,sys; print os.path.realpath(sys.argv[1])\"" | |
alias mypbcopy="tr -d '\n' | pbcopy" | |
function cpth { | |
realpath $1 | mypbcopy | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment