Note: This site is currently "Under construction". I'm migrating to a new version of my site building software. Lots of things are in a state of disrepair as a result (for example, footnote links aren't working). It's all part of the process of building in public. Most things should still be readable though.

Today I Learned Quickly Copy a Directory Path

I add this to my `.zshrc`, `.bashrc`, etc... files to quickly copy directory paths from the command line:

Code

alias pwc="pwd | tr -d '\n' | pbcopy"

It runs `pwd`, clips the newline off then sends it to the pasteboard (aka clipboard).

Super handy.

_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._