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

Include valid values in --help #2691

Open
smprather opened this issue Dec 20, 2023 · 2 comments
Open

Include valid values in --help #2691

smprather opened this issue Dec 20, 2023 · 2 comments

Comments

@smprather
Copy link

smprather commented Dec 20, 2023

There are many ripgrep options that take an = value. Can the help be improved to show the list of valid values? The error message should do the same. As it is now, all I get is this. Thanks @BurntSushi !

$ rg --color
missing value for flag --color: missing argument for option '--color'

$ rg --help  ### Edit: this should have been -h ###
...
--color=WHEN                    When to use color.

I had to search the repo to find the valid values.
image

@BurntSushi
Copy link
Owner

The values for --color are in the --help output. The output you've pasted looks like it's from the -h output even though you have rg --help as the command you ran.

@smprather
Copy link
Author

You are correct. I editted the OP to correct.

I am used to -h and --help being aliases. In fact, I can't recall a case where that wasn't true.

I would still request you add the valid values to the error message. But I'll leave that up to you. I'll leave it open. Feel free to close if you want to take a pass.

Thanks for this incredible tool. I use it literally 100 times/day!

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

2 participants