Skip to content

Conversation

travv0
Copy link
Contributor

@travv0 travv0 commented Dec 21, 2020

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.

@libre-man
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants