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:

  1. Make sure it’s fast.
  2. 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 column
  • exa -T: recurse into directories ala tree
  • exa -l --git: show git metadata alongside file info

Afternoon notes, October 03, 2017

Someone will always have a slicker Git workflow than you. For example,Auto-squashing Git Commits for clever rebasing.

The passage of time is weird, lately. Nonetheless, it’s surprising that the Dynamo white paper is ten years old. Ten years of NoSQL hype. Even from a naive yours truly.

I’ve been using the fish shell for about five months and it is pretty great. A shell with human affordances! It has very good guesses about what I want to do (completions) and what I want it to remember (history). You can configure it with a web interface or regular-old dotfiles. It doesn’t do anything bizarrely different from your typical Unix-style shell, namely bash, so there’s not much new to learn and when I SSH to a server, I don’t wonder what kind of weird contraption I’m interacting with. I haven’t bothered to learn its scripting language because I’ve decided no one should learn those anymore and they should use Ruby, Python, Go, etc. for that kind of thing.