Skip to content

Commit

Permalink
argv: permit repeated flags
Browse files Browse the repository at this point in the history
This commit builds on the previous argv refactor by being more principled
about how we declared our flags. In particular, we now require that every
clap argument is one of three things: a positional argument, a switch or
a flag that accepts exactly one value. The latter two are always permitted
to be repeated, and we modify the code that consumes a clap::ArgMatches to
always use the *last* value of an argument. (clap by default always uses
the first value of argument, if it has been repeated and is accessed via
one of the singleton accessors.)

Fixes #553
  • Loading branch information
BurntSushi committed Feb 4, 2018
1 parent ce84e1e commit d83bab4
Show file tree
Hide file tree
Showing 2 changed files with 336 additions and 210 deletions.
Loading

0 comments on commit d83bab4

Please sign in to comment.