Shell history is more valuable than shell customization
Thorsten Ball, Which command did you run 1731 days ago?:
Recipe for living a good life in the shell:
- Make sure it’s fast.
- Make sure its history can grow nearly infinitely and you can fuzzy-search through it.
A sage developer once told me he didn’t maintain dotfiles at all. He worked across so many machines and servers that keeping a shell configuration working across many systems was folly. Instead, the most important thing for him was making sure his shell history was synced across all those computers.
At first, I thought this was merely amusing. But the more I thought about it, the more I realized how deeply wise it is. Dotfiles, in the form of functions and aliases, abstract and ossify, the commands you think you’ll run frequently. But reverse searching through your total shell history provides you with access to commands you have run and lets you quickly edit/adapt them in-situ.
This makes the history file for your shell (possibly) the most significant file on your computer. Not just because it’s useful, but as a working memory and a reflection of your journey.