Software I Use
01 Mar 2023 - Ben
I’ve enjoyed using the terminal ever since I found one on my computer. I’ve seen “scripting” as a way to get a computer to do anything, magical. Even magical compared to computers more generally; everything interoperates in a terminal and feedback is consistent in place, if not always in format.
What makes the terminal magical? The more I learn about the terminal, the more I realize it’s the Unix philosophy and POSIX that has really made the terminal what it is. It isn’t the terminal directly, but the practices around software that runs in the terminal that really makes it great.
“Everything is text” and “Everything is a file” abstractions are a great lowest common denominator, especially when used in conjunction with line processors like sed or awk.
But the beauty of the terminal doesn’t end with POSIX or commands written before I was born; there are new utilities that follow this philosophy and have made my work more productive. They are:
having an easy way to parse json (a format that gained popularity while I was alive) makes a lot of sense today, and jq does a great job of following the Unix philosophy. It plays well with stdin/stdout, other files, etc.
like jq, csvq makes it easy to work with csv data sets on the command line, using sql syntax. Sometimes the data takes a little cleaning up, but sql is such a powerful tool that my coworkers think I'm some sort of wizard after I have the answer to their question 5 seconds after giving me a csv file.
fzf, or the fuzzy search finder, is a unique one in my mind. It gives me a menu of options but somehow still plays nicely with stdout, using stderr to show the options. I'm not sure if that use would be frowned upon by Unix purists, but it's very practical in my mind. It also plays great with the next item, kakoune.
kakoune (kak in the terminal) is a great editor, inspired by vim but selection oriented, running in a server/client configuration to really be able to configure it as a light ide. It gives enough commands `([a-]!&|)` to interact and transform text with other command line tools that this interactive terminal application still integrates very well with other commands (following Unix philosophy). Getting the lsp integrated was a huge bonus, and their clippy character has been amazingly helpful in finding commands. I could spend more time setting keybindings, but honestly most commands are pretty straightforward and searchable. I’ve been excited to find answers to nearly all my questions online already, even though I haven’t heard much about this editor in my day to day. If I had to gripe, I'd complain that formatting commands have been tough for me to figure out.
finally ripgrep, which is supposed to be just a faster, prettier grep. The default recursive search feature has been very nice, as well as the output controls. The default gives me plenty of information to the find and edit what I’m looking for, but I can also turn it all off easily enough for piping to other commands. It also respects the gitignore of my project unless I tell it not to, which means I'm always searching through files I want.
Bonus: nnn. I’ve never used noice, and I’m still learning nnn. But it’s nice to have such an interactive file manager in the terminal. This should integrate very well with kakoune, although I haven’t quite figured out how yet.
The future: I’ve installed sxmo on a pinephone I have lying around. I was able to install all of these (I didn’t try nnn) on it. I basically have access to all of the same tools on Mac and PostMarketOS/SXMO because of Unix and POSIX. And once I get ssh setup, I could conceivably connect to it and type on a full keyboard over the internet.