erusev Posted January 23, 2023 Share Posted January 23, 2023 # this works rg "aaa" . # this doesn't work rg "aaa" The third param (the ".") is optional, and everywhere else `rg` works w/o it. Here's the usage pattern: USAGE: rg [OPTIONS] PATTERN [PATH ...] Link to comment
vitor Posted January 23, 2023 Share Posted January 23, 2023 What do you mean when you say it doesn’t work? What’s your code and what’s the result you get? Have you looked in the debugger? Link to comment
erusev Posted January 24, 2023 Author Share Posted January 24, 2023 Thanks, I should have specified. It can be just a scrip object like this (see screenshot) or an external script where `rg` is a subprocess -- in both cases it won't work w/o the path param (the ".") > What do you mean when you say it doesn’t work? What’s your code and what’s the result you get? Have you looked in the debugger? Good question. It returns an empty set of results, "0" matches -- so it does manage to call `rg` because the output `rg` output, but for some reason, it doesn't find results. Link to comment
erusev Posted January 25, 2023 Author Share Posted January 25, 2023 I thought I should also note that using `fd` (which is another search tool) instead of `rg` works as expected -- it shows results from `~/folder/to/search`. Link to comment
vitor Posted January 25, 2023 Share Posted January 25, 2023 Curious. A similar command (grep -R "aaa") works without issues as well. The answer likely lies in rg, maybe in how it determines the current directory or the implicit path. erusev 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now