TIL about `zsh_stats`. 😎

#zsh #git

@gregdonald Ok, two things:

First, I totally misread this and thought it was giving me commands ranked by the number of zfs operations!

Second, I discovered that this is part of oh-my-zsh, but managed to port it to fish without too much trouble. :)

(I was a happy zsh user for 25 years, and it's still my favorite posix-ish shell. No complaints.)

@gregdonald Okay one thing that really skews the numbers for me between zsh and fish is that fish doesn't have aliases the same way posix does, so the history stores the EXPANDED abbreviations, where zsh stores the unexpanded aliases.

The numbers are mostly for fun anyway, so it's probably not a big deal, but interesting to notice.

@penryu What do you like most about fish? I tried it for a couple of hours but eventually went back to zsh after I kept running into stuff that I needed to bring over from my .zshrc :(

@gregdonald Totally fair question, especially since I fought off so many alt shells since adopting zsh decades ago!

1. I embraced the fact that I could use one shell for scripting and another interactively, allowing me to use a non-POSIX-compat shell.

2. I insisted that any shell I adopt would have a stable design and mature codebase, and be available and supported on all platforms I use.

3. fish has long been widely known as catering to user-friendly interactive use

4. I test-drove it for a week and was surprised that it actually made my everyday tasks easier and more intuitive (once I learned <C-f>)—so much so that I didn't even mind losing my CAREFULLY CURATED setopts.

5. I ignored 1/3 of (2) by adopting fish 4.x, which had just been rewritten in Rust. 😅

@gregdonald But other than occasionally remembering a few idiosyncrasies of fish when constructing pipelines, it's been pretty painless.

Some call-outs:

1. Can't use `(these; kinds; of subshells)` but can use `{ these; types }`, which are often enough.

2. No POSIX aliases, just abbr'eviations, each with trade-offs.

3. psub

I still keep my zshrc et al, and am prepared to go back if it ever stops being easier.