Upgrading Command Line History
The problem with command line history and how we're trying to fix it
Command line history revolutionized the way we interact with shells ever since it was added to the original csh shell in 1978 by Bill Joy. History allows us to easily navigate, recall, and reuse previously entered commands. In fact, I can't imagine using the terminal without "Up Arrow", Ctrl-R, and
history | grep. Yet, for 45 years, the implementation of history has seen little change, with data still stored in a single flat file in each user's home directory.
There are two problems with this approach. The first is that history is segregated by user and machine. The second, is that the current format doesn't allow commands to be associated with rich metadata. To me, it feels obvious that a comprehensive record of every command typed into our terminals — both local and remote — complete with metadata like working directory, user, host, timestamp, command duration, and exit code, should be readily searchable and available at all times.
How Wave is Solving It
Unified history, with rich metadata, is one of the core features we've built into Wave Terminal. I've been using Wave as my primary terminal for the past year and have over 25k history items (5706 unique commands). I can easily search for commands that were run on my local Macbook, or on remote Linux boxes. I also have all of the history for VMs and Docker instances that have long since been terminated or re-imaged.
Over the past year, this history feature has been a lifesaver. It's helped me recall everything from the steps to create a Mac 'icns' file to the command sequence for manually notarizing a Mac application. It's also invaluable for tasks like identifying the specific packages needed to reinstall a remote Linux box, enabling seamless recreation after termination.
Wave's history feature also works hand-in-hand with another of Wave's core features: persistent tabs. Because each command is indexed to the specific tab in which it was executed, we get a command history for each tab that persists, even across disconnections, terminal restarts, and machine reboots. This means that my AWS deploy commands, executed in their own dedicated tab, are neatly separated from my git commits or local builds, which are run in separate tabs. This separation helps to keep my terminal more organized and efficient.
But there's more to come! Wave's mission is to create a more accessible, batteries included, terminal experience, focused on improving developer experience. We're developing features like more advanced history search, tagging for history items, a straightforward editing function to clear unwanted entries, opt-in AI integration, and options to import and export command sets in an open universal format.
We'd love to hear your thoughts on Wave Terminal. Try it out by downloading the latest version at https://waveterm.dev/download (available for MacOS and Linux) and share your feedback, report bugs, or suggest features in our Discord Channel or on GitHub.