PROMPT_COMMAND has the following flaw: a command gets recorded as soon as it has finished. So command which never finish (e.g. because they run for a long time, and the user closes the terminal window, or reboots the system) never get recorded. Another flaw: the users starts a long-running command in terminal window 1, and immediately they want to start a variant of it in terminal window 2, but it's not available in the history.
I would never normally mention this, but I'm reading this repo on mobile & it seems Forgejo doesn't wrap .txt files on mobile. Any reason not to use .md for a new project in 2026?
It is written entirely in shell script, with the only dependency being sqlite itself.
Currently I tend to log all my ssh sessions out to text files and grep through the whole lot to find what I want, so a better version of that would be lovely, especially if it could automatically redact secrets or similar, as I'm aware thats a downside of the current setup.
Also I do like the premise, recently stopped using atuin due to all the extra bells and whistles and just went back to fzf.
https://dandavis.dev/the-bash-history-i-always-wanted.html
I also use fzf to search my history I believe you just need so source the right keybindings file to make ctrl+r use fzf.
i guess you could say it's because you may want dates for each command but for that you can just use a CSV or TSV file no?
does it have to do with the searching?
Now, I admit I don't use these that often, but they can be useful.
It also does stats and whatnot based on the history. I've never looked at those.
Storing the shell command history in a database instead of the memory of each interactive Bash shell, it would make Bash start up faster, and also use less memory.
Even if you're on spinning rust, your shell history is probably in cache. You don't really need FST index for this usecase, IMHO.
The DB is at this point 10years old. I use it to evaluate my work habits and patterns. More recently I have started transitioning to a different shell and I used it to move only the functions and aliases I still use, instead of the full collection.
It’s quite handy.