larkery/zsh-histdb
View on GitHub ↗ ★ 1,394 Shell
A slightly better history for zsh
22 mentions on Hacker News by 17 people: 2 stories, 20 comments · first 2017-04-13 · latest 2026-07-24
20082026
-
For those of you on zsh, I have been a big fan of https://github.com/larkery/zsh-histdb It is written entirely in shell script, with the only dependency being sqlite itself.
comment by craftkiller · 2026-07-24 · in Stinkpot: SQLite-backed shell history -
If you are open to using zsh, take a look at https://github.com/larkery/zsh-histdb . It stores your zsh history in a sqlite3 db. The benefit of this is that your history is well-structured and indexed, and that you can use SQL to query it.…
comment by oftenwrong · 2025-02-15 · in Yash: Yet Another Shell -
…for all of my shells, and I no longer have commands disappear from my history unexpectedly. [0] https://github.com/larkery/zsh-histdb
comment by craftkiller · 2024-08-19 · in Modern Unix Tool List -
zsh-histdb achieves something similar. Combined with zsh-autosuggestions it's quite nice. https://github.com/larkery/zsh-histdb
comment by sweetgiorni · 2024-01-26 · in Starship.rs: minimal, fast prompt for any shell -
Totally agree with this. I use https://github.com/larkery/zsh-histdb slightly modified to work more smoothly for me. If I remember correctly, I tried Atuin but it messed up multi-line commands. Zsh-histdb handles them well.
comment by donaldihunter · 2024-01-21 · in Keeping a long shell history -
…prefix with additional weighting depending how close in the directory tree they were used. [0]: https://github.com/larkery/zsh-histdb
comment by Kubuxu · 2024-01-21 · in Keeping a long shell history -
…for it[1]) which allows you to easily answer this type of question - can highly recommend it. 0. https://github.com/larkery/zsh-histdb 1. https://github.com/m42e/zsh-histdb-fzf
comment by tomatocracy · 2024-01-21 · in Keeping a long shell history -
I have been using this, which is similar, for a few years: https://github.com/larkery/zsh-histdb
comment by oftenwrong · 2023-05-06 · in Atuin replaces your existing shell history with a SQLite database -
…to mess with the history settings it might be worth checking out that tool while you're at it. 0: https://github.com/larkery/zsh-histdb
comment by matthberg · 2022-10-13 · in Fixing macOS Zsh Terminal History Settings -
…been especially useful for me to get the context of what I did, not only the command itself. [1] - https://github.com/larkery/zsh-histdb
comment by pmoriarty · 2022-06-30 · in Ask HN: Can I see your cheatsheet? -
…(without judgement): https://github.com/cantino/mcfly https://github.com/jcsalterego/historian https://github.com/larkery/zsh-histdb + https://github.com/m42e/zsh-histdb-fzf https://github.com/ellie/atuin All of these except the OP (I…
comment by phiresky · 2022-05-16 · in RESH: Rich Enhanced Shell History -
…https://loshadki.app/shellhistory/ https://github.com/AlexanderThaller/hstdb https://github.com/larkery/zsh-histdb
comment by da39a3ee · 2021-11-09 · in Jog: Print the last 10 commands you ran in the current directory -
Here is a zsh function (added to ~/.zshrc) I made for use with https://github.com/larkery/zsh-histdb to get the same effect, but only showing commands whose exit_status is 0: jog() { sqlite3 $HOME/.histdb/zsh-history.db " SELECT…
comment by lrobinovitch · 2021-11-08 · in Jog: Print the last 10 commands you ran in the current directory -
…history entries, so you can never really reconstruct what was run. Edit: I should really try out https://github.com/larkery/zsh-histdb . There's no reason a modern system's history shouldn't store start and finish timestamps, return code,…
comment by kbd · 2021-11-08 · in Jog: Print the last 10 commands you ran in the current directory -
…Oh-my-zsh zsh-autosuggestions: https://github.com/zsh-users/zsh-autosuggestions Tmux Histdb: https://github.com/larkery/zsh-histdb Zoxide (replace cd): https://github.com/ajeetdsouza/zoxide Fzf Rip (replace rm):…
comment by kortex · 2020-04-25 · in Shell Productivity Tips and Tricks -
…I have one continuous history. I'm working on figuring out multi-host history for One True History. https://github.com/larkery/zsh-histdb I haven't tried it, but the keywords you are looking for is bash history db/sqlite. E.g.:…
comment by kortex · 2020-04-25 · in Shell Productivity Tips and Tricks -
…on the zsh train, but it might be able to be ported to bash (it's just pre-hooks and some sqlite) https://github.com/larkery/zsh-histdb
comment by kortex · 2020-04-19 · in When did I run that command? Update your Bash prompt with the command start time -
…[1] for bash, and a bunch of other suggestions in the discussion thread on it on HN [2] [0]: https://github.com/larkery/zsh-histdb [1]: https://undertitled.com/2017/04/12/historian-because-please-... [2]:…
comment by aeontech · 2020-02-08 · in My productivity app for the past 12 years has been a single .txt file -
you might be interested in using zsh-histdb[1] as well. really, really cool [1] https://github.com/larkery/zsh-histdb
comment by y4mi · 2017-12-13 · in Fish: A user-friendly command line shell for macOS, Linux, etc -
…package I will happily duplicate them into another repository and keep them up to date there. Ed.: https://github.com/larkery/zsh-histdb I haven't done anything to import the history file because some of the information is missing so it…
comment by larkery · 2017-04-13 · in Historian: Because Please Stop Deleting My Bash History