Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
bstivers opened this issue Mar 10, 2022 · 0 comments
Open

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

bstivers opened this issue Mar 10, 2022 · 0 comments

Comments

@bstivers
Copy link

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant