-
Notifications
You must be signed in to change notification settings - Fork 18
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
Not enough space for descriptive help text #14
Comments
I've written a subclass of GLD::Usage which can do the old behaviour, the new behaviour and now that I've Whilst doing that I noted that |
Given input: "abc|d|e" the while loop will fire with pos of 4 and 6. At 4, pos minus lastpos is 4. Not short, good. At 6, post minus lastpos is 2. Short, good. Then we get to the post-while condition. length is 7. length minus lastpos is 1. short should be true, so we should check == 1. Yes, I agree, line 149 should be 1. I also agree with that +1, since the formatter later inserts a space of its own. |
Would you consider a PR to add the optional old behavior? Do you think it's worth adding? Seems plausibly useful. |
The maximum width for help text is too restrictive and if you have long option names multiple names for some options, help text will be limited to few characters, which looks ridiculous. Would it be possible to provide configurable line width, instead of assuming 80, which is antiquated and not suitable for most present day users? |
Running into this myself:
A few things could be solved here:
Here's what it looks like if just 1&2 were solved:
|
Another form I spotted in
Basically, there's an upper limit on the size of descriptive options, and if it goes past that, the description ends up on the next line. |
Doing that last form should be easy: [ "auto-vertical-output", "..." ],
[ "Automatically switch to vertical output mode if the result is wider than the terminal width." ], It's not ideal, and I'll make it better soon, but it works. I hope you'll see other improvements in this area in the not too distant future. I'll leave this task open to comment on improvements if and when they happen. |
Unfortunately, that fix still pushes the descriptions back to the 27 character limit, since the first line still has the long list of switches. |
From the 0.99 change log "options that take arguments now indicate the argument's type and whether it
can be given multiply"
The arguments now take up some 48 characters as opposed to 28 characters in version 0.98. This squidges
the help text into 32 characters (on an 80 column terminal) and that looks ridiculously short.
Would you please make this change optional so that the original behaviour can be restored?
The text was updated successfully, but these errors were encountered: