Redundant help and version options in man page

When generating a man page with the generate-manual plug-in, the top-level --help and --version options get repeated for every subcommand.

This might make sense for the --help display and the completion output, but in the man page, it is very redundant and distracting.

Is there some way to avoid this?

Example, from my utiluti tool:

UTILUTI(1)                  General Commands Manual                 UTILUTI(1)

NAME
     utiluti – Read and set default URL scheme and file type handlers.

SYNOPSIS
     utiluti subcommand [--version] [--help]

DESCRIPTION
     --version
             Show the version.

     -h, --help
             Show help information.

     url     Manipulate default URL scheme handlers

             --version
                     Show the version.

             -h, --help
                     Show help information.

             get     Get the path to the default application.

                     scheme  the url scheme, e.g. 'http' or 'mailto'

                     --bundle-id
                             list bundle identifiers instead of paths

                     --version
                             Show the version.

                     -h, --help
                             Show help information.

             list    List all applications that can handle this URL scheme.

                     scheme  the url scheme, e.g. 'http' or 'mailto'

                     --bundle-id
                             list bundle identifiers instead of paths

                     --version
                             Show the version.

                     -h, --help
                             Show help information.

             set     Set the default app for this URL scheme.

                     scheme  the url scheme, e.g. 'http' or 'mailto'

                     bundleID
                             bundle identifier for the app

                     --version
                             Show the version.

Could you open a GitHub issue for this bug? Hopefully it's something simple to fix. Though I suspect we will need to update the ToolInfo structure with a notion of built-in flags

:+1:

3 Likes