-
-
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
Suggest --fixed-strings on invalid regexps #709
Comments
Hmmmm... I think I'd be OK with that. |
I can pick this one up next. One question though: Do we still want the error generated by the I can think of a relatively straightforward, easy-to-implement fix if we're OK with the latter. |
I would suggest regex error details to be shown to the user. grep, ack, and ag also give details about regex errors. |
@balajisivaraman We definitely want to surface the syntax error. |
Can this be closed with the merging of #727? |
@balajisivaraman Yup! Thanks. |
@BurntSushi does |
@wsdjeg I don't understand your question or your suggestion. Could you please elaborate? Please include examples. |
@wsdjeg Also, have you read the documentation?
|
@BurntSushi I have read it, I just create a grep plugin , and using rg as backgroud tool. search the user's input. I hope I auto detect if the user is input a right expression. that means, it will be better there is an option --auto-fixed-string. if there is error in such expression, treat it as fixed string. otherwise use it as regex. here is an gif: |
@wsdjeg That seems like a distinct feature request that is completely orthogonal to this issue. Please open a new issue. |
Ok, and thanks for this project. |
I think ripgrep should suggest the
--fixed-strings
argument if there's a regex syntax error.The text was updated successfully, but these errors were encountered: