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 64879d9 commit 1a05e3a
Show file tree
Hide file tree
Showing 2 changed files with 336 additions and 210 deletions.
Loading

0 comments on commit 1a05e3a

Please sign in to comment.