Need separator to arrange parameters in groups
suntong opened this issue · 4 comments
suntong commented
This is for better usage() output.
E.g.,
from
Options:
-h, --help display help information
-c, --config config file [=wireframe_cfg.json]
-H, --host host addr [=$HOST]
-p, --port listening port
-D, --daemonize daemonize the service
-o, --output The output file (default: some file)
-v, --verbose Verbose mode (Multiple -v options increase the verbosity.)
to
Options:
-h, --help display help information
-c, --config config file [=wireframe_cfg.json]
-H, --host host addr [=$HOST]
-p, --port listening port
-D, --daemonize daemonize the service
-o, --output The output file (default: some file)
-v, --verbose Verbose mode (Multiple -v options increase the verbosity.)
Note that adding \n
at the end of usage text will not always work, for e.g., the above --config
/--host
case because the defaults are added after the user provided usage text.
mkideal commented
And, add a new example 031
suntong commented
Thx @mkideal, I'd have to test what happens when there is an extreme long usage text that need to spread across multi-lines, and get back to you...
suntong commented
Perfect!