Opened 7 years ago
Last modified 6 years ago
#12091 new Bugs
help2man compatibility: add one more space between "arg" and description
Reported by: | Owned by: | Vladimir Prus | |
---|---|---|---|
Milestone: | To Be Determined | Component: | program_options |
Version: | Boost 1.61.0 | Severity: | Problem |
Keywords: | Cc: |
Description
help2man splits the option name and its description at two (or more) spaces. When using a longest option with an argument there is only one space between "arg" and the option description text.
Attachments (5)
Change History (9)
by , 7 years ago
by , 7 years ago
by , 7 years ago
Attachment: | potest.help2man added |
---|
comment:1 by , 7 years ago
comment:2 by , 7 years ago
for options without arguments there are at least two spaces, so the bug is in the probably unwanted special behavior for options with arguments
by , 6 years ago
Attachment: | 0001-improve-option_column_width-calculation.patch added |
---|
comment:3 by , 6 years ago
OK, I looked into the source and found out that two spaces are intended according to a comment in options_description::get_option_column_width().
I found more subtle bugs in this function and fixed them as well, the function should now also be easier to understand.
Beware: the patch is only compile-tested with vim-youcompleteme, I don't have a test infrastructure set up for boost.
by , 6 years ago
Attachment: | 0002-fixup-improve-option_column_width-calculation.patch added |
---|
comment:4 by , 6 years ago
Version: | Boost 1.58.0 → Boost 1.61.0 |
---|
I've had the time to actually build it and fixed an off-by-one error (attached).
Timo,
thanks for your report. However, at presents I'm a bit reluctant to change output format to accomodate a particular tool. I don't think this was a concern anybody raised previously.