Hacker News new | ask | show | jobs
by ralgozino 492 days ago
Install "fzf" [0] and set it up to be used with control+r, there's no going back. You get as a bonus the chance to use fzf in a lot of other places :)

I guess that more advance tool would be "atuin" [1], but it is too much for my use case.

[0] https://github.com/junegunn/fzf [1] https://github.com/atuinsh/atuin

5 comments

Seconding `fzf`, it's such an improvement from the stock Ctrl-R behavior I think it's worth installing even if you never actually run `fzf` at the command line itself. Hence why I led with the new shortcuts at https://andrew-quinn.me/fzf (fuzzy `cd` with Alt-C being the other one of note).

Interestingly, the default fish shell also comes with something similar these days, although I still prefer the look of `fzf`.

fzf is also really good when you want to make interactive bash scripts (or recipes in Justfiles or Makefiles).
I switched to atuin and it's a huge step up from native Ctrl + R and fzf because you can press Ctrl + R again and again and it switches between searching through directory, session, host, or global history.
I listened to an interview with the creator of atuin on the changelog podcast. It seems like a compelling idea. The only thing that makes me consider switching from the fzf/ctr-r combo is syncing my history between tmux sessions. But I don't spend enough time in the terminal to really justify the time to set it up.
Never heard of atuin but it looks awesome. I'm going to try it out.
Oh, looked at the feature set. Sounds interesting.

"Sync your shell history to all of your machines, wherever they are"

That sounds like a potential security issue though.

It also just uses a SQLite db, so you can sync it manually yourself if you want. But their implementation seems pretty secure.

Regardless, I just run it local only on each of my machines, separately. It’s still really helpful!

Just a note that this is an optional add-on that I don't use.
FWIW the sync server can be self-hosted.
This has been a larger productivity boost for me than LLMs. I suppose I should use LLMs more.
+1 for `fzf`. And if you're using Oh My Zsh then check out fzf-zsh-plugin: https://github.com/unixorn/fzf-zsh-plugin
Came here to say this. Fzf is almost too good, it's so convenient to find past commands that I've gotten two years into a career as a software developer without committing any of my most common command line tools to memory.