News for hackers. Stuff that matters.
Re:Show HN: Zev – Remember (or discover) terminal commands by submeta on Thursday April 24, 2025 @01:10PM (#43785041)
Nice! I use a combination of an endless bash (zsh) history with timestamps that I navigate via fzf and ctr+r and comments I occasionally add to commands via # at the end followed by my annotation so that I can rediscover the command.

I do this ever since I switched to a Mac in 2015 and my history has over 60,000 lines. So that’s basically my knowledge base :)

But your project looks nice. Will check out.

Re:Show HN: Zev – Remember (or discover) terminal commands by afefers on Thursday April 24, 2025 @03:02PM (#43786227)
Can you explain how you achieve this?
Re:Show HN: Zev – Remember (or discover) terminal commands by import on Thursday April 24, 2025 @04:06PM (#43786951)
Not op but you need fzf and you need to increase the history size of your bash/ssh whatever

https://github.com/junegunn/fzf

Re:Show HN: Zev – Remember (or discover) terminal commands by WalterGR on Thursday April 24, 2025 @07:47PM (#43788750)
Shells that use readline (such as bash) may have a history search feature built-in and on by default. Try pressing Ctrl-r or Cmd-r and see if a prompt pops up.

You can build your own workflow by doing something like:

1. Turn on your shell’s feature to record command history.

2. Look into its feature set to control things such as how many entries it remembers, whether it remembers duplicate entries, and whether it timestamps each entry. (Don’t forget to restart each instance of your shell, if needed, for changes to take effect.)

3. Install a tool such as fzf that allows interactive filtering of arbitrary text. (On Mac, it’s as easy as `brew install fzf`.)

4. Write the necessary shell script(s) / functions / aliases to do things like:

+ invoke the fuzzy-finder on the shell’s history file or a modified version of that file (for example, a modified version that excludes bash’s timestamp lines, or that joins them - perhaps in a human-readable format - with the command it timestamps)

+ process the output of the fuzzy-finder tool (for example, to copy the command to the clipboard, paste it into the shell, or execute it immediately - which will necessitate things like removing any timestamp added in the previous step.)

Step 4 can be easy as something approximating (I’m on mobile right now):

   fzf “$HOME/.bash_history” | copy-to-clipboard
Re:Show HN: Zev – Remember (or discover) terminal commands by porridgeraisin on Saturday April 26, 2025 @04:45AM (#43801942)
Fzf installs hooks automatically for ctrl+r and a bunch of other stuff

Search for `fzf --bash`. Note that the version in the ubuntu repos is too old to have this feature (I think)

Re:Show HN: Zev – Remember (or discover) terminal commands by reddit_clone on Thursday April 24, 2025 @05:44PM (#43787845)
Exactly my setup including the #tag's. It is my second brain.

What I love about this is the fzf's fuzzy narrow down. You don't have to start at the beginning of command, you don't have to worry about exact spelling. Just a few snippets you remember, it will narrow it down really fast.

I use the same fuzzy search narrow downs in Emacs.

I miss it everywhere else.

Re:Show HN: Zev – Remember (or discover) terminal commands by aldanor on Sunday April 27, 2025 @08:45AM (#43811534)
Fish has built in fuzzy search on ctrl-r as well, with no extra config needed