Replies: 3 comments
-
@kmvanbrunt Do you have any thoughts on this? |
Beta Was this translation helpful? Give feedback.
-
As I recall, the reason we used |
Beta Was this translation helpful? Give feedback.
-
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.
|
Beta Was this translation helpful? Give feedback.
-
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?
Beta Was this translation helpful? Give feedback.
All reactions