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

Suggest removing -- if specified, but unnecessary #3604

Open
2 tasks done
nazar-pc opened this issue Apr 2, 2022 · 1 comment
Open
2 tasks done

Suggest removing -- if specified, but unnecessary #3604

nazar-pc opened this issue Apr 2, 2022 · 1 comment
Labels
A-help Area: documentation, including docs.rs, readme, examples, etc... C-bug Category: Updating dependencies E-easy Call for participation: Experience needed to fix: Easy / not much

Comments

@nazar-pc
Copy link

nazar-pc commented Apr 2, 2022

Please complete the following tasks

Clap Version

3.1.6

Describe your use case

Users are sometimes confused by help message generated by Clap in case -- was used where it was not expected:

$ ./app -- --dev --tmp
error: Found argument '--dev' which wasn't expected, or isn't valid in this context

        If you tried to supply `--dev` as a value rather than a flag, use `-- --dev`

Describe the solution you'd like

In this particular case the suggestion should be to remove -- instead of adding one more, like this:

$ ./app -- --dev --tmp
error: Found value '--dev' which wasn't expected, or isn't valid in this context

        There is an flag with the same name, try to remove `--`

Alternatives, if applicable

No response

Additional Context

No response

@nazar-pc nazar-pc added the C-enhancement Category: Raise on the bar on expectations label Apr 2, 2022
@epage epage added C-bug Category: Updating dependencies A-help Area: documentation, including docs.rs, readme, examples, etc... E-easy Call for participation: Experience needed to fix: Easy / not much and removed C-enhancement Category: Raise on the bar on expectations labels Apr 4, 2022
@epage
Copy link
Member

epage commented Apr 4, 2022

Thanks for reporting this case!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-help Area: documentation, including docs.rs, readme, examples, etc... C-bug Category: Updating dependencies E-easy Call for participation: Experience needed to fix: Easy / not much
Projects
None yet
Development

No branches or pull requests

2 participants