You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Make it easier to decide usage line length late #55
We allow passing a usageLineLength to ArgParser or CommandRunner in the constructor. In both cases the field is final and is read internally by the usage getter. This means that the wrapping needs to be decided before the arguments are parsed, so parsed arguments can't be used to inform the line length.
The most immediate option I can think of is to change usageLineLength from a final field to a settable field, and then the option that controls wrapping would pass a callback that sets the field on the parser.
I've run into other issues with how eager ArgParser and CommandRunner is about pinning things down. In particular, it is surprisingly hard to gracefully handle help options that only show up when --verbose is passed. At some point, we may want to consider a more just-in-time API for generating help/usage information that takes a few parameters instead of having to bake everything when you create the ArgParser.
Activity
munificent commentedon Aug 25, 2020
I've run into other issues with how eager ArgParser and CommandRunner is about pinning things down. In particular, it is surprisingly hard to gracefully handle help options that only show up when
--verboseis passed. At some point, we may want to consider a more just-in-time API for generating help/usage information that takes a few parameters instead of having to bake everything when you create the ArgParser.