You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unfortunately, using possible_values has always been case sensitive. This is partly by design though, as there may exist cases where people wish to support different values which differ only in capitalization. Assuming you only want to support lowercase variants (which is the most common case by far), you could use something like
Enum case insensitivity was add in #104.
Unfortunetly, if you use
possible_values()
with your enum (for example,possible_values(&MyEnum::variants())
) case insensitivity is lost.This means the helpful
clap
error message listing supported values cannot be used and one must handle it manually.Rust Version
rustc 1.15.1 (021bd294c 2017-02-08)
Affected Version of clap
clap 2.20.3
Expected Behavior Summary
Because the enums are case-insensitive, I expected
possible_values
to be case insensitive as well.Actual Behavior Summary
Using
possible_values
makes enums act like they are case-sensitive again.Steps to Reproduce the issue
arg_enum!
possible_values
to the enumfoo
andFoo
input values differentlyThe text was updated successfully, but these errors were encountered: