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

Fix a regression with parsing multivalue options #5196

Merged
merged 1 commit into from
Mar 16, 2018

Commits on Mar 16, 2018

  1. Fix a regression with parsing multivalue options

    By default, clap interprets
    
    ```
    cargo run --bin foo bar baz
    ```
    
    as
    
    ```
    cargo run --bin foo --bin bar --bin baz
    ```
    
    This behavior is different from docopt and does not play nicely with
    positional arguments at all. Luckily, clap has a flag to get the
    behavior we want, it just not the default! It will become the default in
    the next version of clap, but, until that time, we should be careful
    when using the combination of `.long`, `.value_name` and
    `.multiple(true)`, and don't forget to specify `.number_of_values(1)` as
    well.
    matklad committed Mar 16, 2018
    Configuration menu
    Copy the full SHA
    70ff33a View commit details
    Browse the repository at this point in the history