Comment

Comment by mcint

Sweet! Well-expressed, and well-explored. It's easy to setup an interface that makes search a bit easier still, including showing you a list as you interactively filter history, with fzf, [gh-fzf].

Examples of what users use most frequently, the key-bindings.{bash,zsh} has history key binds [arch-fzf]. The developer, junegunn, writes about it more generally, and all the other fun ways you can apply it [dev-fzf].

For a few years, I wrote history files per shell-spawn, and loaded a batch of history from recent days to keep fresh what's in the immediately searchable history.

Nowadays, I've just offloaded that to atuin [atuin], which I install from brew or with cargo binstall. Much less configuration, and now get to quickly explicitly switch between history lists filtered as: global, host (you can sync among hosts), session, directory, -- I don't remember what filter session+ means.

- [gh-fzf]: https://github.com/junegunn/fzf#key-bindings-for-command-lin...

- [arch-fzf]: https://wiki.archlinux.org/title/Fzf

- [dev-fzf]: https://junegunn.github.io/fzf/shell-integration/

- [atuin]: https://atuin.sh/

parent mcint 14 days ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton