docopt.rs icon indicating copy to clipboard operation
docopt.rs copied to clipboard

Implement optional flag argument handling

Open Tharre opened this issue 9 years ago • 0 comments

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.

Tharre avatar Jan 23 '16 21:01 Tharre