3 ms·
docopt is almost perfect. It needs to support optional flag arguments (á la `--color[=WHEN]), and having the first un-indented line after `Usage:` be treated a
by LukeShu 11y ago
docopt is almost perfect. It needs to support optional flag arguments (á la `--color[=WHEN]), and having the first un-indented line after `Usage:` be treated as prose. The latter is on `master` of the Python (reference) implementation, but hasn't landed in a release or a spec.
Also, better errors for when the programmer screws up the formatting of the doc string.
- ridiculous_fish 11y agoShameless self-plug: you may be interested in my version of docopt at https://github.com/ridiculousfish/docopt_fish https://github.com/ridiculousfish/docopt_fish . Its syntax is more forgiving, it's capable of expressing more usage specs, and it has excellent error reporting for doc strings.
- LukeShu 11y agoVery cool! I'll definitely keep it in mind (though I've been tending to use Go for greenfield projects recently).