Skip to content

Commit

Permalink
adding case_insensitive to yaml parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
Windfarer committed Nov 5, 2018
1 parent 33f908d commit bada4f5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/args/arg.rs
Expand Up @@ -139,6 +139,7 @@ impl<'a, 'b> Arg<'a, 'b> {
"conflicts_with" => yaml_vec_or_str!(v, a, conflicts_with),
"overrides_with" => yaml_vec_or_str!(v, a, overrides_with),
"possible_values" => yaml_vec_or_str!(v, a, possible_value),
"case_insensitive" => yaml_to_bool!(a, v, case_insensitive),
"required_unless_one" => yaml_vec_or_str!(v, a, required_unless),
"required_unless_all" => {
a = yaml_vec_or_str!(v, a, required_unless);
Expand Down
5 changes: 5 additions & 0 deletions tests/app.yml
Expand Up @@ -90,6 +90,11 @@ args:
multiple: true
help: Tests 3 max vals
max_values: 3
- case_insensitive:
help: Test case_insensitive
possible_values: [test123, test321]
case_insensitive: true

arg_groups:
- test:
args:
Expand Down

0 comments on commit bada4f5

Please sign in to comment.