Skip to content
This repository has been archived by the owner on Apr 26, 2021. It is now read-only.

Add <command> section #43

Open
felixSchl opened this issue Jun 4, 2016 · 0 comments
Open

Add <command> section #43

felixSchl opened this issue Jun 4, 2016 · 0 comments

Comments

@felixSchl
Copy link
Owner

Similar to [option], add a special section for commands:

Usage: foo <command>

Available commands:
  bar  lorem ipsum
          foo
  qux lorem ipsum

This extends docopt significantly.

This is a bit tricky to parse, but I think the most intuitive would be to mark the indentation level of the first
word after the actual command name. Then only treat text as part of the description of the command currently being parsed if it equal or more indented than the mark.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant