News for hackers. Stuff that matters.
Re:Find Files (Ff) – File Search Utility in Rust by StavrosK on Wednesday February 27, 2019 @06:42AM (#19262595)
It does search hidden files, it doesn't search gitignored files. Why are you assuming it's identical to grep?
Re:Find Files (Ff) – File Search Utility in Rust by iruoy on Wednesday February 27, 2019 @07:22AM (#19262772)
From https://github.com/BurntSushi/ripgrep

> Like other tools specialized to code search, ripgrep defaults to recursive directory search and won't search files ignored by your .gitignore files. It also ignores hidden and binary files by default.

Re:Find Files (Ff) – File Search Utility in Rust by nurettin on Wednesday February 27, 2019 @06:51AM (#19262632)
Have you installed it?

    nurettin@ ~ () $ mkdir test
    nurettin@ ~ () $ echo "TEST SOMETHING" > test/.env
    nurettin@ ~ () $ cd test
    nurettin@ ~/test () $ rg "TEST"

Why I don't know, because it has grep in the name? Do you now realize where the confusion might be lying?
Re:Find Files (Ff) – File Search Utility in Rust by burntsushi on Wednesday February 27, 2019 @07:46AM (#19262877)
This is part the whole point of ripgrep. If you don't want it to do smart filtering, then you either alias `rg="rg -uu"` or just use grep if it's fast enough for you.

Some people might miss this, yes. That's why it's mentioned in the first couple sentences of the man page.

Re:Find Files (Ff) – File Search Utility in Rust by nurettin on Wednesday February 27, 2019 @07:56AM (#19262928)
RTFM is an important thing we remind to eachother in order to reach for our own knowledge instead of relying upon others to give it to us.

And yes, this most important bit of information is in the man page and the help text, but not at the top of the page people who came to actually download the tool will look first. Which is `https://github.com/burntsushi/ripgrep` .

Re:Find Files (Ff) – File Search Utility in Rust by burntsushi on Wednesday February 27, 2019 @08:06AM (#19262961)
Sure. I'm just trying to justify the actual behavior of ripgrep (which you are poo-pooing) by saying that it is at the very heart of what ripgrep is about. It's not some weird corner case that's supposed to bite you. It is its raison d'etre.

The README mentions that it respects gitignore rules. I just updated it to include hidden/binary files. Thanks.

Re:Find Files (Ff) – File Search Utility in Rust by nurettin on Wednesday February 27, 2019 @08:47AM (#19263161)
Poopoo sounds really funny. Haha.

Still pretty sure grep is a confusing name for something which doesn't grep "because of smart filtering" <- that is just your rules, your way, whatever your heart desires, whatever you want to call "smart".

This is not about Rust anymore (which I actually like)

This is a point you seem to be ignoring in favor of opinions such as "this is the reason for this tool to exist" <- again, your way, your rules.

It is circular to name something after something else, then making it act totally different, whatever you want it to do, changing output format, filtering files, then responding to confused people saying hey this is what I wanted. Yes it is. It doesn't change a thing.

Thanks for the readme update.

Re:Find Files (Ff) – File Search Utility in Rust by gjm11 on Wednesday February 27, 2019 @10:11AM (#19263676)
Making tools whose names end in "grep" that don't behave exactly the same way as grep itself is almost as old as grep. Every Unix-like system has egrep and fgrep, for instance (in fact, they're usually symlinks to the same executable as grep itself, and I at least pretty much always use egrep in preference to grep). There's an approximate-search tool called agrep that's also decades old and pretty widely used.

ripgrep is no more "totally different" from grep than egrep (different regex syntax) and fgrep (not regexes at all) are.

Re:Find Files (Ff) – File Search Utility in Rust by burntsushi on Wednesday February 27, 2019 @09:06AM (#19263260)
If I named it something totally different, people might say, "why didn't you just call it a grep, because that's basically what it is." Language and perspective is funny like that.

> whatever you want to call "smart".

Related: https://github.com/BurntSushi/ripgrep/blob/master/FAQ.md#pos...

Re:Find Files (Ff) – File Search Utility in Rust by unionpivo on Wednesday February 27, 2019 @10:24AM (#19263769)
I like rust, and I generally like this trend of rewrites, but I will have to support systems with old grep for a long time jet.

So in cases where the new "improved" tool departs from old standard [1], it just add one more thing, that can screw you, especially if it comes over as a replacement.

grepping for settings in dot files is not exactly a corner case for me.

And setting up aliases to me it's similar. It will just mess with you on systems when you don't have them set up.

I guess it depends what you primary use case is. I can see how a developer that spends most of his time on his desktop/laptop command line would find this good default.

[1] And that it does so silently. If something fails hard or errors on the side of not filtering, its less of an issue.

Re:Find Files (Ff) – File Search Utility in Rust by burntsushi on Wednesday February 27, 2019 @12:29PM (#19264984)
The FAQ question I linked in my previous comment directly addresses most of your complaining: https://github.com/BurntSushi/ripgrep/blob/master/FAQ.md#pos... --- In particular, note the statements about what it means to "replace" grep.

> So in cases where the new "improved" tool departs from old standard [1], it just add one more thing, that can screw you, especially if it comes over as a replacement.

The solution to this is so stupidly simple. If this is a problem for you, then _don't use the new tool_.

ripgrep is not a replacement for POSIX grep.

Repeat after me. ripgrep is not a replacement for POSIX grep. I've never once marketed it as such. Others might. Why? See the FAQ for an explanation.

> grepping for settings in dot files is not exactly a corner case for me.

It's not for me either. Why does everything have to be black and white? Just because it isn't covered by default doesn't mean anyone thinks it's a corner case. It is precisely because it is not a corner case that ripgrep makes it very easy to disable "smart" filtering.

And once again, of course, if you do not want to be bothered by this, then don't use the tool.

Re:Find Files (Ff) – File Search Utility in Rust by unionpivo on Thursday February 28, 2019 @03:45AM (#19269971)
I read that FAQ before I made my previous comment, and I don't see how it really changes anything I wrote.

I don't expect ripgrep to change, or to cater to my needs, like you said I don't have to use it. I managed to figure that out on my own, but thanks anyway.

Perhaps I expressed myself poorly, or we are misunderstanding each other, but it doesn't really matter.

Thanks for writing ripgrep, I might not use the utility, but when I stared learning rust, ripgreps source was one of the sources I looked at as a nontrivial cli app.

Have a nice day.

Re:Find Files (Ff) – File Search Utility in Rust by Fnoord on Wednesday February 27, 2019 @10:37AM (#19263849)
The tool is called rip grep. You could see it as a way of saying "RIP grep". The tool isn't called grep. The binary isn't called grep. It therefore isn't grep.

For people who make grep an alias into rg, they can use, rg does have three compatibility modes: -u -uu and -uuu # see the manpage for details.