Is there a “standard” format for command line/shell help text?

前端 未结 8 1452
难免孤独
难免孤独 2020-11-30 16:30

If not, is there a de facto standard? Basically I\'m writing a command line help text like so:

usage: app_name [opti         


        
8条回答
  •  暗喜
    暗喜 (楼主)
    2020-11-30 16:39

    Take a look at docopt. It is a formal standard for documenting (and automatically parsing) command line arguments.

    For example...

    Usage:
      my_program command --option 
      my_program []
      my_program --another-option=
      my_program (--either-that-option | )
      my_program  ...
    

提交回复
热议问题