Copy cwd from Terminal.app to clipboard
Useful when you have a terminal open to a particular directory and want to paste that directory in somewhere else (e.g., File... Open dialogue in an application).
alias cpcd="echo -ne \$(pwd) | pbcopy"
This just evaluates the current directory and then uses pbcopy
to put it on the clipboard.
Written by Kenneth Rose
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Terminal
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#