2 ms·
For zsh, I highly recommend zsh-histdb, it stores all your commands in a sqlite database, along with data like timestamp, current working directory, hostname, s
by GuB-42 6y ago
For zsh, I highly recommend zsh-histdb, it stores all your commands in a sqlite database, along with data like timestamp, current working directory, hostname, session id, etc...
It has its own "histdb" command but the best part is that it integrates well with zsh-autosuggestions, so with the right SQL query you can make it suggest something "the latest command in the current session that matches, or if not found, the most frequent in that directory".
I know it is controversial because it is not using a text file and UNIX loves text files, but it really nice, and you still have your .zsh-history if you want to.
- kortex 6y agohistdb is one of my top favorite tools. And I've come to the conclusion flat files can only get you so far. sqlite is probably the next best thing to flat files, and I think history is one of those things where switching to a db is an immediate win.