You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use short options in docopt like this:
Usage:
someCMD [-a] [-b] [-c <cVar>] [-d <dVar>]
Options:
-h, --help Show this screen
-a Show a stuff
-b Show b stuff
-c <cVar> c stuff with var [default: thing1]
-d <dVar> d stuff with var [default: thing2]
But that is not giving the anticipated result. For example someCMD -c anything puts the value under the dVar key in the resulting json. someCMD -c anything -d anythingelse doesnt work at all. someCMD -d anythingelse does put the value under dVar but cVar is set to someCMD instead of its default value.
I am trying to use short options in docopt like this:
But that is not giving the anticipated result. For example
someCMD -c anything
puts the value under thedVar
key in the resulting json.someCMD -c anything -d anythingelse
doesnt work at all.someCMD -d anythingelse
does put the value underdVar
butcVar
is set tosomeCMD
instead of its default value.Here is a link to try it yourself using the docopt online tool.
What am I missing?
The text was updated successfully, but these errors were encountered: