00JCIV00 / cova

Commands, Options, Values, Arguments. A simple yet robust cross-platform command line argument parsing library for Zig.
https://00jciv00.github.io/cova/
MIT License
110 stars 5 forks source link

Add ability to group arguments together #26

Closed GobiasSomeCoffeeCo closed 1 year ago

GobiasSomeCoffeeCo commented 1 year ago

Would it be possible to add a "help heading" flag that would allow for grouping different arguments together in autogenerated man pages? For instance, the example below would allow for logical separation of different arguments based on their functionality within my cli program.


Client Settings:
  -T, --timeout <SECONDS>
          Number of seconds before a client's request times out

          [default: 7]

  -r, --redirects
          Allow a client to follow redirects

  -H, --headers <HEADERS>
          Allow a client to specify HTTP headers

  -a, --user-agent <USER_AGENT>
          Allow a client to specify a User-Agent

          [default: "Mozilla/5.0 (Macintosh; Intel Mac OS X x.y; rv:42.0) Gecko/20100101 Firefox/42.0)"]

  -i, --insecure
          Disables TLS certificate validation in the client

Response filters:
  -s, --status-codes <STATUS_CODE>...
          Status Codes to include (allow list) (default: 200 204 301 302 307 308 401 403 405)

  -e, --exclude-status-codes <STATUS_CODE>...
          Status Codes to exclude (returns all status codes except the ones passed)

Hope this example makes sense. Keep up the great work. Love the library.

GobiasSomeCoffeeCo commented 1 year ago

Whoops, markdown didn't play nice with this request.

00JCIV00 commented 1 year ago

Makes sense to me! I'll look to add it as part of the manpages update.

00JCIV00 commented 1 year ago

Closed via referenced commits.