Skip to content
This repository was archived by the owner on May 11, 2020. It is now read-only.

Add case sensitive option for ArgEnum #9

Merged
merged 1 commit into from
Nov 26, 2017
Merged

Conversation

Hoverbear
Copy link

@Hoverbear Hoverbear commented Nov 15, 2017

Adds the #[case_sensitive] attribute. Note the tests are failing because clap::App::get_matches does not appropriately handle case insensitive variants.

Closes #9.

@kbknapp
Copy link
Member

kbknapp commented Nov 26, 2017

I'm good with this, and the tests failing doesn't bother me as we haven't released this crate yet.

👍

@kbknapp kbknapp merged commit f94ef37 into master Nov 26, 2017
@Hoverbear
Copy link
Author

@kbknapp I was looking at the code in Clap this weekend but didn't find any specific places where the problems we talked about is happening. :(

@kbknapp
Copy link
Member

kbknapp commented Nov 28, 2017

It's in the src/app/validator.rs I've got it working in a local branch right now. Just running the last few tests and I'll put in a PR.

The only thing that has to be done on ArgEnum side is specify Arg::case_insensitive(true) which I can just roll into #10 no problem.

@Hoverbear
Copy link
Author

AMazing!

kbknapp pushed a commit that referenced this pull request Jul 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants