I'm trying to frame a docopt usage which accepts set of options.
Naval Fate.
Usage:
naval_fate.py ship
[-b <b_command>]
[-e <e_command>]
If I use this, it works fine:
ship -b barg -e earg
The output is:
{
"-b": true,
"-e": true,
"<b_command>": "barg",
"<e_command>": "earg",
"ship": true
}
But if use this, it still gives the same values to the respective arguments:
ship -e earg -b barg
Output:
{
"-b": true,
"-e": true,
"<b_command>": "earg",
"<e_command>": "barg",
"ship": true
}
Note that I passed earg to -e but it is assigned to b_command in the output.
I saw the same behavior with golang's docopt-go
package. Is my usage string wrong? If so, how should I frame the docopt usage string such that it assigns the correct values correct arguments and honors the specified arguments?