Command Line Options Documentation Standards

I often hack some Thor, Rake, Bash or even PHP command line tools. And I want to document sequential-arguments and command line options.

Is there an official or recommended standard in this documentation?

How and when the option is optional [- foo = bar], or when the parameter can be a single n value ("yes | no"), etc.

I would rather not come up with my own standard when there is an official (POSIX?) Standard or manual that already contains a list and is not intended to document tools and applications in the CLI.

+4
source share
1 answer

I'm not sure which output format you have in mind, but why not use the man-page style? This seems to work well for command line tools.

+1
source

Source: https://habr.com/ru/post/1436949/


All Articles