Hacker GitHub

← All repos

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

Mentions per year 22 mentions · busiest year 2024 (5)
20082026
  1. 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
  2. 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
  3. …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
  4. 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
  5. 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
  6. …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
  7. …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
  8. I have been using this, which is similar, for a few years: https://github.com/larkery/zsh-histdb
  9. …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
  10. …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?
  11. …(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
  12. …https://loshadki.app/shellhistory/ https://github.com/AlexanderThaller/hstdb https://github.com/larkery/zsh-histdb
  13. 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…
  14. ▲ 3
    ZSH History Database
    story by emdashcomma · 2021-11-08 · 0 comments
  15. …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,…
  16. …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
  17. …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
  18. …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
  19. …[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]:…
  20. you might be interested in using zsh-histdb[1] as well. really, really cool [1] https://github.com/larkery/zsh-histdb
  21. ▲ 85
    Store your zsh history into a sqlite3 database
    story by pmoriarty · 2017-08-17 · 16 comments
  22. …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…