docopt / docopt.cpp

C++11 port of docopt
Boost Software License 1.0
1.04k stars 146 forks source link

Missing support for comments #155

Closed mibli closed 2 years ago

mibli commented 2 years ago

In original docopt video, there are comments added in usage pattern, however using them results in unrecognized patterns.

Here's an example that didn't work for me

Usage:
  i3switch (next | prev) [wrap]                 # order movement (tabs, stacks, windows)
  i3switch number <num>                         # order movement (tabs, stacks, windows)
  i3switch (left | up | right | down) [wrap]    # direction movement (grid)
  i3switch (-h | --help)                        # show this help

I also didn't see '#' handled anywhere in code, nor in tests, so I'm guessing it's a missing feature.

jaredgrubb commented 2 years ago

Hm, I don't see support for this in the Python either, so maybe those are just "meta comments" and not meant to be actually supported in the actual docopt strings.

mibli commented 2 years ago

I guess I minderstood the python introduction video. It was refering to option descriptions. https://youtu.be/pXhcPJK5cMc?t=964 Thought it would be a great way to create a short help. Thanks.