This page collects and organizes tools and such that I think might come in handy one day. Some of them I’ve had the pleasure of using. Some of them, I use all the darn time. (Others, I’d do well to remember and start using more.)
Last updated: 2020-10-10 21:37:25 -0400 -0400
Basic Shell Usage
- Fish shell: I ditched zsh for this after a few years when the sheer complexity of zsh and its inherited functionality through the confluence of csh ksh bash and all the rest got to me. Fish blows all that away in favor of simpler semantics and configuration and mostly just doing the right thing out of the box.
- ShellCheck: You owe it to yourself to use this any time you’re writing a script file. It’s awesome. For interactive use, I switched from Bash to Zsh, and then to Fish, but for scripts? I’m still writing Bash, because ShellCheck supports Bash, and ShellCheck is worth it. Its diagnostics point to a wiki that provide examples and context, so you can learn gradually through your mistakes. (But seriously, way too often, the oopsy is just “you forgot to quote this. and this. and this.” and zsh & fish will save you from that footgun, so please, use them in your interactive sessions.)
- ripgrep (rg): The latest and greatest in the grep -R/ack/ag lineage.
- fd: I ditched
findfor this a bit after I learned of it. It’s smart the same way rg is smart, and wicked fast the same way, too.
- bat: This is on my “I should use this more” list. It’s a souped-up cat - it’s clever enough to do syntax highlighting. It also surprised me by proving to include pager functionality, so it might be able to replace
- watchexec: This is a Rust iteration on the “do stuff when files changed” watcher genre that also includes chokidar (NodeJS), reflex (Go), and watchman-make (C++/Python). (The overall Watchman is more daemon-like than the others. It splits “establish a watch” from “subscribe to specific changes” and manages them as long-lived things, not interactive processes. As such, it pops up in stuff like IDE tooling.)
Slicing & Dicing
- jq: A Swiss Army knife for JSON. A good place to start is
jq . < someFile.jsonto pretty-print the file’s contents.
- xmlstarlet: A Swiss Army knife for XML. I’ve used the selection (XPATH) support in anger at least once.
- xsv: A Swiss Army knife for CSV/TSV data. I’m still looking for an excuse to use this, and a time when I remember to do so rather than firing up Python and doing
import csvand going from there. (Probably if you’re comfortable with Pandas or R, that’s the better route, anyway.)
- cfilter is a filter to colorize output based on patterns. You write a syntax file, pipe some other tool’s output through
cfilter, and suddenly, it’s easier to read. I’ve used it to improve the scannability of the Mercury compiler’s error output with mmc.syntax.
- git-revise is like
git rebase -ibut without all the workdir churn, which is really convenient when you’re running tests and builds on change, doubly so when the worker processes barf on a sequence of rapid changes. The git-revise introductory blogpost provides more context. It’s worth sorting out Python under macOS for.
git-cleanupfrom nvie’s git toolbelt is a ready-to-run version of the script everyone eventually winds up writing to delete local branch heads that have already been deleted on the remote. Depending on how you work,
shatter-by-filemight also come in handy, though I haven’t worked them into my process yet.
- git-when-merged makes it easy to answer, “Which feature branch merge brought in this commit?”
- git-absorb automates working out which existing commits the tweaks you make in response to code review feedback belong to: Stage your changes, then let your existing commits absorb them.