Help wrapping
#1226
Replies: 3 comments
|
@kmvanbrunt Do you have any thoughts on this? |
0 replies
|
As I recall, the reason we used |
0 replies
|
I think a general solution for this situation is we should define a constant for the default helpformatter used in cmd2. A developer can then overwrite this constant early in program startup with one of their own. As a near-term work-around you can probably assign over the Cmd2HelpFormatter with a custom one you've provided. something like this might do it. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
We are starting development on a new CLI using cmd2 and really like all the features it has to offer. One thing we have noticed is that long help strings don't wrap very well; our devs have different terminal width preferences so hardcoded line breaks aren't a great solution. It seems like this can largely be fixed by having the Cmd2HelpFormatter inherit from argparse.HelpFormatter instead of argparse.RawTextHelpFormatter, but I was curious if that would break other things. I haven't noticed any issues in my testing but the 'Raw' version was probably chosen for a reason.
Also, that doesn't fix the top-level help, which seems to always target 100 columns (though actually needs 102 because of the spaces between columns). Am I missing some easy way to configure this or have it adjust based on the terminal width?
All reactions