severity 972741 wishlist thanks On Fri, Oct 23, 2020 at 11:29:28AM +0800, Drew Parsons wrote: >help2man is too restrictive with regards to the version string. Often >a program does not support the --version flag at all, but help2man >does not handle that tidily. The only way you can manage that is to >set --version-string explicitly. > >Other times you simply might not want to use the version string even >if it is available. > >But you can't set > > help2man --version-string="" > >An empty string gives an error: > Option version-string requires an argument > >So the version string handling is too restrictive. A better default >(in my opinion) is to use an empty version string if the command does >not provide one, and to make it possible to set --version-string=""
The problem of converting arbitrary unstructured help/version text into a manual page is somewhat beyond the capability of this simple Perl script. help2man is documented[0] to handle "reasonably standard `--help' and `--version' outputs", and here "standard" means what is described in the GNU standards manual[1]. If your program doesn't support --version at all, then my suspicion would be that the --help output is probably not in the format the script expects either. I would be interested to see sample --help output. What is the program? --bod [0] https://www.gnu.org/software/help2man/#Overview [1] https://www.gnu.org/prep/standards/html_node/Command_002dLine-Interfaces.html#Command_002dLine-Interfaces