-
-
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
Regexps in configuration file are ignored if no other regexp is present in the command line #1730
Comments
Could you please explain why you want to do this? |
I'm using ripgrep as a backend for some script and I'd like to pass all the arguments/configuration in the same way. Using the configuration file seems more elegant than passing individual parameters on the command line which (albeit unlikely nowadays) is subject to limitation. |
Thanks for clarifying. Ultimately, this would be difficult to fix and I don't think your use case is worth it. I updated the man page's section on config files to clarify this case. |
I see your point and admittedly I'm not aware of the internals, but still this somewhat smells fishy (no disrespect) for a number of reason, e.g., the fact that the usage hints that
And also that it can be worked around with something like (for the sake of the argument): $ echo 'xxx foo xxx' | RIPGREP_CONFIG_PATH=/tmp/.ripgreprc rg -e '$x'
xxx foo xxx Anyway thanks for such a quick action and for this project! |
The man page had the correct usage hints, but the -h/--help output was using an older more incorrect version of the hints. Closes #1730 (again)
Ah, yes, the usage hints in the The usage hints were also written long before the config file functionality existed. So just running |
What version of ripgrep are you using?
How did you install ripgrep?
What operating system are you using ripgrep on?
macOS 11.0.1
Describe your bug.
If regexps (
--regexp
) are exclusively specified in the configuration file, then they are ignored.What are the steps to reproduce the behavior?
What is the actual behavior?
What is the expected behavior?
(With
foo
being highlighted.)The text was updated successfully, but these errors were encountered: