docopt.rs
docopt.rs copied to clipboard
Implement optional flag argument handling
A lot of *nix programs (grep, make, ls, git to name a few) make use of optional flag arguments. Usually they look like this (taken from make --help
):
-j [N], --jobs[=N]
So flag_j
would essentially be a Option<Option<i32>>
.
I'd like to see this feature in docopt as well.
This was also brought up in #299 in the vanilla docopt repo, but there have been no comments so far.