unix
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.
exa in 30 seconds
What is it? exa is ls
reimagined for modern times, in Rust. And more colorfully. It is nifty, but not life-changing. I mostly still use ls
, because muscle memory is strong and its basically the only mildly friendly thing about Unix.
How do I do boring old ls things?
Spoiler alert: basically the same.
ls -a
:exa -a
ls -l
:exa -l
ls -lR
:exa -lR
How do I do things I rarely had the gumption to do with ls?
exa -rs created
: simple listing, sort files reverse by created time. Other options:name, extension, size, type, modified, accessed, created, inode
exa -hl
: show a long listing with headers for each columnexa -T
: recurse into directories alatree
exa -l --git
: showgit
metadata alongside file info