unix-opts icon indicating copy to clipboard operation
unix-opts copied to clipboard

only pad opt descriptions to a max of argument-block-width

Open travv0 opened this issue 4 years ago • 1 comments

This might be me misunderstanding the intent, but when adding a newline after a long option name, it's indented like this:

  -p, --path SOME_LONG_TEXT_HERE
                                 This is the path to do something to.
  -n, --name NAME                Your name.

which doesn't seem like the newline is helping anything since the line's the same length as if it was just:

  -p, --path SOME_LONG_TEXT_HERE This is the path to do something to.
  -n, --name NAME                Your name.

This patch makes it left-pad the descriptions to a maximum of argument-block-width which I personally think makes a lot more sense, as that's the point when they're put on the next line.

So instead for a block width of 25 it would look like:

  -p, --path SOME_LONG_TEXT_HERE
                         This is the path to do something to.
  -n, --name NAME        Your name.

Let me know what you think. I'll wait to see what you think before updating the tests.

travv0 avatar Dec 21 '20 04:12 travv0

I totally agree your version is way better, so please do add tests!

libre-man avatar Jan 07 '21 23:01 libre-man