Fisher Plugin for Shell History

/ 1 September 2022

A while ago I found the ShellHistory app for macOS when its developer invited me to its itnital beta. It provides a way to graphicallly see and organize the history of your shell, and also sync it between computers. Not something I use often, but useful from time to time.

Why do I not need this a lot? Well, frankly, because the shell I use, Fish, is insanely good at autocomplete that makes most times I’d need history sort of just go away in the course of typing in the shell. But this app is still good when I do want to view my actual history, and as someone with more than one Mac, the syncing is a nice benefit too when maybe I ran something last on a Mac I’m not sitting at.

A downside is that this app needs a hunk of code in your shell’s config to get it to work. This is ugly, and clutters up what may otherwise be a simple config file. Luckily Fisher exists as a plugin system for the Fish shell. But no one had created a plugin to include the ShellHistory config yet.

So I made one. You can find my shellhist-fisher plugin at Github. All it does is put the code snippet for ShellHistory you are given in its Setup screen into a file in Fish’s conf.d folder to make it easier to setup ShellHistory in such a way that it does not clutter up your normal config file that you may be editing with code of your own.

While you’re at it… Another fisher plugin I recently installed that I find quite useful (and is tangentially history-related, sort of) is done. This will send you a notification when a long-running command finishes if your command line is not the frontmost window. There are many other useful plugins that you may find for your Fish shell.

Discussion