argi icon indicating copy to clipboard operation
argi copied to clipboard

Truncate help messages

Open Owez opened this issue 3 years ago • 1 comments

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:

  1. 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
  2. Truncate using .. to either fit terminal length or more realistically 80 characters if the total length of the line is >80

Owez avatar Sep 18 '21 10:09 Owez

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.

Owez avatar Sep 22 '21 19:09 Owez