Atuin replaces your existing shell history with a SQLite database
github.com
github.com
It is kinda nice, to quickly search your history and that part works really well, but what I don't like (maybe there are configs for it) is that you:
1. have an additional button press for the usual "get me that last operation" and
2. it searches all sessions (which is mostly nice, but sometimes annoying, I guess)
You can toggle back and forth between what is being searched. For example, you can search globally, or one session.
This allows me to switch context/projects etc and have a valuable history, instead of a whole mashup of all kind of other activities crammed into a single file in $HOME...
Perhaps I could use a single SQLITE database with a fancy invocation to do the same? Ie limit the history to the current subtree commands have been invoked in?
I've had iTerm session logging enabled on my personal machine for a while and have found it very useful every now and then when I need to remember what or how I did something a long time ago?
But there is a decently large risk that the output will contain something sensitive I don't want stored, so I'm wondering if there is some project which does this but would allow me to write some rules on what to react, which servers I don't want the output stored from etc.
For now I just manually disable logging when I know I will do something sensitive or when I know it's going to generate a lot of noise I don't want to waste space on. I have a shortcut created so I can select "Toggle logging" with shift+cmd+o.
I keep my shell history in sqlite database since 2017. Around 120k records at this point. Never synced history from the work laptops. Only personal history. In 2017 wrote my own bash script (later optimized for zsh) to just record everything in sqlite with hooks on prompt. [1] I mostly work right now on Mac, don't need to support Linux anymore, so wrote an app for Mac, that syncs the history over iCloud, and has a GUI interface. [2] Anyway, storing years of shell history somewhere, where you can do complex searches, and actually find some magic command you run a few years ago, is priceless. - [1] https://www.outcoldman.com/en/archive/2017/07/19/dbhist/ - [2] https://loshadki.app/shellhistory/
Its fuzzy searcher seems to start up super fast, even after importing a very large zsh_history.