Skip to content
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 examples for options that take a string argument #2

Open
drudgesentinel opened this issue Mar 6, 2024 · 0 comments
Open

Add examples for options that take a string argument #2

drudgesentinel opened this issue Mar 6, 2024 · 0 comments

Comments

@drudgesentinel
Copy link

drudgesentinel commented Mar 6, 2024

(Local and gem rg versions: 13.0.0)

When I run rg manually on my local machine with --color always I get:

$ rg wizard --color always
rg.rb
7:result = rg.exec  'wizard'

searchthis
3:The five boxing wizards jump quickly.

If I try to specify options result = rg.exec 'wizard', options: { color: "always" }
I tried providing always a few different ways (symbol, escaping quotes, etc).

I get an error only when specifying options. It appears that '--color always' should work with the ripgrep command so I must be missing something:

gems/ripgrep-0.1.3/lib/ripgrep/result.rb:27:in `initialize': error: Found argument '--color always' which wasn't expected, or isn't valid in this context (Ripgrep::ResultError)
	Did you mean --color?

I suspect I'm doing something obviously wrong, and as such I would appreciate if examples where arguments needed to be specified (outside of boolean true/false)

I think this will show me what I'm doing wrong

Thank you for your time and providing this gem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant