-
-
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
add a way for file types to include rules from other file types #83
Comments
Would |
The argument against this feature is:
A good counterpoint to (2) is that type inclusion means you always get updates in |
I agree that a separate flag like I do indeed specify my file types in an alias, but I would like the alias to be easy to read. The curly brace glob syntax will help a lot with shortening my alias, so maybe the downsides of adding another flag outweigh the benefits in this case. |
I do kind of come down on your side of things, honestly. The various |
One possible issue with adding this is that ripgrep's argv parser can't tell the position of each flag relative to one another. So for example, if you did this: We have the same problem with --type-clear, but I'm hesitant to make it worse until we either decide to live with it, or fix it. So I'm going to let this one linger for now. The other potential relief is that I expect |
OK, I'd like to propose a specification for this so we can move forward. Here are a couple key design constraints that I've imposed:
OK, now for the spec. The documentation for
Additional glob rules can still be added to the
Note that type names must consist only of Unicode letters. Punctuation characters are not allowed. If someone has thoughts on the above or would like to implement it, I'd be happy to mentor it. I think it is a relatively isolated change and should probably only require modifying the implementation of |
Huge +1 for this! Just opened #252, my Github issue search-fu failed me (should have been able to ripgrep it 😉). I've never touched Rust before, or I'd give this feature a go myself.
Great news! |
Hi @BurntSushi, I'm taking a swing at this. You say in your spec here:
but I think the only character disallowed presently by |
@CannedYerins Thanks for taking a look at this! And yes, I believe your observation is correct. We'll need to do a semver bump of the |
@tankorsmash No, sorry. I feel that we've been getting along just fine so far with wrapper scripts and aliases. There is talk of |
@tankorsmash Also, please take further discussion to the appropriate issue: #196. Let's not hijack this one! |
Thanks, thought I looked hard enough, that's how I stumbled onto this one. I'll delete my comment to clear this up. |
@tankorsmash Deletion wasn't necessary, but thanks! :-) |
This would be useful for defining file types that are aggregates of other file types, for example:
would be equivalent of specifying:
The text was updated successfully, but these errors were encountered: