-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Why was .rgignore deprecated in favor of .ignore? #673
Comments
It's simple: so that multiple tools can use the same set of ignore rules. The change was made here: #41 and the conversation that sparked it is here: https://news.ycombinator.com/item?id=12567328 I have zero interest in discussing the particular choice of With that said, I am open to potentially supporting something like a Am I understanding the issue here correctly? Do you agree that the above would solve this specific problem? So to make this happen, I think these are the steps:
|
You can simulate this today with the (If you think that even given the above we should still have a separate XDG ignore file, please file a separate issue.) |
Not at all. The issue has clearly been discussed at length, and I missed the memo. Thanks very much for taking the time to point me over to it.
I am beginning to appreciate the volume of opinion and decisionmaking that has gone into getting things the way they are thus far, so rather than rocking the boat with more undocumented functionality, I might restate the issue as a request for better documentation (both in the README and the manpage). Specifically, I think a section clarifying 1) the usage of the I'd offer to submit a PR for these additions to the docs myself, but clearly, I have no idea what I'm talking about. Nevertheless, if you'd like me to take a stab at it (as I'm sure you have bigger fish to fry), I'll gladly oblige. |
Hmm but it sounds like the cause of this issue is an actual problem that might be worth solving. Separate from how we got here, do you still see a use case for more specific ignore files or does .ignore on its own solve the problem and I'm misunderstanding? |
The aforementioned issue on fd was simply that the @sharkdp was trying to decide whether it made sense to honor (And if you concocted, in a single file, a way to specify lines that applied to grep and lines that applied to find and lines that applied to both, my opinion is that it would unduly increase the documentation burden and violate the principle of least surprise.) fd's problems can be reasonably addressed by simply disregarding (I definitely still advocate for documentation on |
This commit adds support for ignore files with custom names. This allows for application specific ignorefile names, e.g. using `.fdignore` for `fd`. See also: #673 See also: sharkdp/fd#156
Without presuming to ask for a reversal of this deprecation, I'd like to get some perspective on why
.rgignore
was abandoned in favor of.ignore
. There are many programs that can be configured with ignore files — git, syncthing, and GNU stow all come to mind. All of these programs follow a practice of namespacing configuration files to avoid potential collisions (.gitignore
,.stignore
, and.stow-local-ignore
, respectively) — in fact, I have a directory that contains all three (my~/.config
dir).I understand that both ag and rg previously supported separate
.agignore
and.rgignore
files, and I'm also under the impression that both have been deprecated in favor of a unified.ignore
file. In a currently-open issue with fd, a question arose as to whether it made sense for the program to honor.ignore
by default. I don't think it does, as the use cases for the programs are different, but I also think that the fact that.ignore
actually belongs to rg/ag (which cannot be inferred or intuited from the name of the file itself) obscures the nature of the question.So if I may ask, why have the developers of rg and ag chosen to designate a common configuration file which, in a manner of speaking, pollutes the global config-file namespace? and would you consider switching back to a namespaced alternative, like
.grepignore
?(And either way, might you also consider supporting a non-hidden XDG-compatible ignore file — i.e.,
~/.config/ignore
, rather than~/.config/.ignore
?)The text was updated successfully, but these errors were encountered: