Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

first line of sysnopsis overshoots max. characters #142

Closed
waacc-gh opened this issue Jun 12, 2017 · 2 comments
Closed

first line of sysnopsis overshoots max. characters #142

waacc-gh opened this issue Jun 12, 2017 · 2 comments
Milestone

Comments

@waacc-gh
Copy link

The first line of (standard-) synopsis is longer than the maximum number (80 (?)) of allowed characters. The following lines of the synopsis are wrapped properly to not overshoot the maximum number.

---------1---------2---------3---------4---------5---------6---------7---------8
Usage: small-test-program [-acorv!?] [--version] [-h <number>] [-p <file>|<folder>] [-d
                 <folder> [<folder>]] [-i <includePattern>
                 [<includePattern>...]]
@remkop
Copy link
Owner

remkop commented Jun 12, 2017

Nice catch!
It looks like the synopsis heading (Usage: in this case) is not included in the character count at all.
This is wrong and the synopsis heading characters should be included in the count. (In case the heading contains a newline or %n, we should start counting from the last newline.)

Would you be interested in providing a pull request?

@waacc-gh
Copy link
Author

waacc-gh commented Jun 13, 2017

It's not urgent for me to get a fix for this issue.

You could think about adding an additional attribute to the @command annotation and/or an additional parameter to the CommandLine.usage() methods to change the maximum allowed characters in a line. The improved usage() methods might be helpful to align the output to different windows/screen widths.

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

No branches or pull requests

2 participants