-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Configuration file is ignored #1373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
You haven't made it clear whether you've set the |
Setting the |
Not sure what you're talking about. The rule is simple: if |
I have the same problem, it is a homebrew's missing duty to notice user like:
|
I'm confused as to why the home directory is not checked by default, my |
I think it's because, at the time, there was no off-the-shelf library for looking up config files in the right place ( See #196 (comment) |
Because if I did that, the angry denizens of the Internet will unite and whine about how there is yet another config file polluting their home directory. So if I instead support the XDG spec, then some subset of mac users will complain about how macOS doesn't use XDG. And even if I fix that, there is still Windows to consider, which is an entirely different beast. Compare that to just setting an env var, and it is comparatively quite simple. Moreover, this is pretty carefully documented in the guide. This is the only issue I've seen that has complained about it. Feel free to search the issue tracker. The feature request for config files documents the full progression. Until someone develops a Rust crate that implements config file discovert correctly and otherwise meets my standards, this is how ripgrep will behave. |
I think a lot of people consider This has the added benefit of allowing a repository embed a config. @BurntSushi I'm probably hijacking this issue, but I really think the general topic of better support around config files should be explored. I'm reaching out here, before making another issue, to see if you open to at least discussing this |
No. I think setting an environment variable is flexible enough. I'm not interested in pursuing an option where files scattered about a directory tree can modify the runtime arguments and behavior of ripgrep. (And also, your proposed scheme seems to implicitly codify dropping a config file into |
Seems like everyone has accepted it for other extremely popular tools. I see editorconfig as much more widely adopted than ripgrep (in my experience), and I've never heard anyone complain about this. Since people don't have to opt-in to dropping a config file anywhere, I can't imagine whom you are worried about offending (read the previous comment already). Edit: I don't want that to come off as insensitive. I'm sure you deal with a lot of crap and are always angering someone. I just don't see how something that isn't forced could inspire anger, while not supporting it does. Responding directly to the environment variable premise, consider the use case of embedding in a repository. The user is required to set this value to |
I didn't say an environment variable was perfect. I said it was flexible enough. The people I'm worried about angering are the people that get upset by the proliferation of dotconfig files in their home directory. They demand that their tools follow the XDG spec. If you haven't heard of these people complaining before, then I'm not sure what to tell you. I see it a lot and I refuse to be the target of their zeal. Just because other projects do this doesn't mean I'm obliged to do it or that it's a good idea. Not all projects are the same. The only reason I added config files in the first place was for Windows users because they solve a real need. Otherwise, I would be happy with aliases and/or wrapper scripts on Unix. Addressing the use case of having arbitrarily nested configuration in a directory tree is not only something that I think is not worth it, but will actively result in more confusing UX. Finally, ripgrep is tool that folks likely want to be able to run on any files without fear that those files will modify its behavior. The feature you've proposed means that ripgrep's behavior will change based on whatever config someone else might have set. This could even include causing ripgrep to run arbitrary executables via the |
Sorry you've had to deal with them. I'm sure it's not great, but can't they just use
Isn't this what we were all doing with |
I just explained why it's not an arbitrary choice and I find your argument of "just" telling people to use grep to be uncompelling. In particular, your use case is far more niche. You can "just" source a file that sets the env var to the config you want when you want to change it for a project specific directory. Kind of like what people do with virtualenv when working on Python projects. It's a pretty standard idiom. And finally, what ripgrep provides cannot be implemented with simple grep aliases/wrapper scripts.
I don't have to deal with them because I've avoided being their target. That's the point. You continuing to argue this point is coming across as combative to me. One of the reasons I don't want to do your idea is for my own emotional comfort by avoiding being a target. There is nothing to argue there. It's simply a consequence of mobs and the semantics of your proposal. Moreover, I've stated several other reasons why I don't want to use your proposal, one of which is security related. If you can't address the security and UX concerns, then there's no point in talking about anything else other than to quibble.
That sounds like a great improvement then. And what people consider "next generation" is typically pretty arbitrary. |
@BurntSushi Well, I can only say sorry you take it that way. Thanks for all your hard work. I hope you reconsider your position some day. |
What version of ripgrep are you using?
ripgrep 11.0.2
-SIMD -AVX (compiled)
+SIMD +AVX (runtime)
How did you install ripgrep?
Homebrew.
What operating system are you using ripgrep on?
macOS 10.14.6 (18G95).
Describe your question, feature request, or bug.
The
.ripgreprc
configuration file appears to be ignored.If this is a bug, what are the steps to reproduce the behavior?
If this is a bug, what is the actual behavior?
The configuration file is ignored.
If this is a bug, what is the expected behavior?
The file should've matched without needing the
--hidden
switch.The text was updated successfully, but these errors were encountered: