Today I Learned: Quickly Copy a Directory Path
I add this to my
.bashrc, etc… files to quickly copy directory paths from the command line:
alias pwc="pwd | tr -d '\n' | pbcopy"
pwd, clips the newline off then sends it to the pasteboard (aka clipboard).
Side note: “pwd” stands for “print working directory”. Using “cwd” would make more sense grammatically (i.e. “copy working directory”) but the keystrokes are cumbersome. Hence, I use “pwc”. Your mileage may vary. Season to taste.