argi
argi copied to clipboard
Truncate help messages
https://github.com/Owez/clonk/blob/15e8676fe218f63a4f6ca36f4f33300161f9c2d3/src/lib.rs#L185
Currently, we allow infinate length help messages, which are good for command-specific autohelp, e.g. ./program my_command --help
, but may not format properly on the overview ./program --help
where my_command
may be a sub-command. To fix this I propose two changes:
- If a help message has a newline, only show the first line in the overview message and the full help in the command-specific help
- Truncate using
..
to either fit terminal length or more realistically 80 characters if the total length of the line is >80
This can be added as a patch after release or on the first release if short-term we can release as rc-1
or beta-1
.