Hacker News new | ask | show | jobs
by turtleofdeath 1999 days ago
How is this different than reverse-i-search?
2 comments

The full page display of selections seems like the most obvious difference to me.
None.

But seems like the trend of the last 10 years is to rewrite every single already existing Unix tool in Rust or node.js. Throwing out code is more fun than reading man pages I guess.

This saddens me. It looks like the average dev in 2020 believes he needs to pollute his working environment with thousands of seemingly useless tools to be productive.

fzf, silver searcher, ripgrep, etc.

I will be downvoted to hell, because these people genuinely believe they need these tools, and will find whatever performance or feature argument to explain why. But from my experience, I am much faster at any command line task than pretty much anyone using these fancy stuff, even though I stick to bash, vim, and coreutils...

The standard tools have a lot of cruft. `grep` being case sensitive by default is I think a good example of a default that used to make sense, but is probably better the other way around today. There are countless other such examples.

Your comment reads as a no-true-scottsman "look how skilled I am" signaling device. You're not necessarily wrong, but you're also clearly fighting a pointless battle, and sound a bit out-of-touch.

Yes, the tools already exist and work. No, they do not need to be re-written, but the new versions are often substantially more usable and newcomers enjoy that. Such is the nature of life. Things change. Accept that and you'll be happier.

Your attitude might win some points with other fight-the-tide-till-my-last-dying-breath types, but it reads to me as "It is the children who are wrong!"

I worked with a guy who had the same attitude about always using kubectl over the gui because it was "faster". He was demonstrably slower at quite a few common tasks, like discovering errors in logs across many pods, than others who used the gui.

Yes it looks much nicer imo. One thing that annoys me with ctrl-r is that if you make a typo and backspace it, you will not be back to where you were. The "cursor" has moved back in history, potentially past the command you were interested in. It's also nice you can see many different matches at the same time.

I kind of think the author should have foreseen this question and provided an answer.

You should see my git aliases that makes heavy use of fzf. It definitely speeds me up. `ga` gives an fzf-powered selection only on files in my git status to `git add`. I can cherry pick commits without ever typing a branch or commit hash. Fuzzy-find on reverse search with fzf is way better than the built-in ctrl+r. ripgrep is way better than grep. I could go on.

I appreciate your call to be familiar with the core unix experience, but the unix userland is definitely enriched by these newfangled tools.

You’ve just picked an arbitrary point in the development of these tools that you’re happy with and are suggesting that any progress beyond that point is wasted. I’m sure there were folks around when bash development started saying that they were super productive in Bourne shell so why start a rewrite from scratch. Is vim the terminal point of editor development, forever? Why wasn’t it when nvi replaced Joy’s original vi? Why aren’t we still using ex?

All of the tools you mentioned started as rewrites of existing tools and only became better over time as they added features. That process hasn’t stopped.

Well put. I got very good at typing:

    find . -type f -exec egrep -il "whatever" {} \;
and now I instead type:

    rg whatever
and, somehow, I feel like that's an improvement.

And it automatically ignores the directories like .git, build, node_modules, etc., whatever is in .gitignore, without having to add a bunch of "-prune" clauses.

I can easily give examples of using `fzf` or `ripgrep` to perform the same action in many less keystrokes than the built-in utilities would require, e.g., traversing a deep directory hierarchy using `fzf` to fuzzy search for the right directory to `cd` to, or performing a text search of only `git` included files over many repos.

Given these tasks are accomplishable in many less keystrokes using `rg` and `fzf` than the built-in utilities, how would you make the argument that you're able to accomplish these command line tasks faster using only "bash, vim, and coreutils"?

Silver searcher and ripgrep can ignore git-ignored files very easily. Don’t know how to do that with grep.

Fzf gives you a list of hits that you can go through to select the one you want. Ctrl-r in bash just shows you the current hit.

Those are real advantages.

So which man page from "bash, vim, and coreutils" should I look into to get the equivalent of fzf?