Skip to content

Context/Options not being picked up with multi-commands #48

Open

Description

@bstivers

Following this click multi-command example:

Context is being passed around the multi-commands properly when on the command line.
So I know my coding is proper.

However, help_option_names¸for example, isn't being picked up by mkdocs-click.

Current Behavior

wbscc

This tool's subcommands are loaded from a plugin folder dynamically.

Usage:

wbscc [OPTIONS] COMMAND [ARGS]...

Options:

Name Type Description Default
--help boolean Show this message and exit. False

Relevant code

CONTEXT_SETTINGS = {
    "token_normalize_func": lambda x: x.lower(),
    "help_option_names": ["-h", "--help"],
}

From command line

$ wbscc --help
Usage: wbscc [OPTIONS] COMMAND [ARGS]...

  This tool's subcommands are loaded from a plugin folder dynamically.

Options:
  -h, --help  Show this message and exit.

Commands:
  hello  Prints hello.

Expected Behavior

wbscc

This tool's subcommands are loaded from a plugin folder dynamically.

Usage:

wbscc [OPTIONS] COMMAND [ARGS]...

Options:

Name Type Description Default
-h, --help boolean Show this message and exit. False

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions