Last Updated: February 25, 2016
·
332
· kenrose

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.