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

Fix issue with options with multiple names #16

Merged
merged 1 commit into from
Jul 11, 2021

Conversation

Robert-96
Copy link
Contributor

@Robert-96 Robert-96 commented Jul 11, 2021

Hi, I found an issues with options that have multiple names. For example if the options has -n and --name in order to change the color of this options you will need to pass -n, to help_options_custom_colors.

@click.group(
    cls=HelpColorsGroup,
    help_headers_color='yellow',
    help_options_color='green',
    help_options_custom_colors={'-n,': 'red'}
)
def cli():
    pass

@cli.command()
@click.option('-n', '--name', help='The person to greet.')
def command(name):
    pass

The fix will allow -n, --name and -n, to work with help_options_custom_colors.

@r-m-n
Copy link
Member

r-m-n commented Jul 11, 2021

Thanks!

@r-m-n r-m-n merged commit 3a11055 into click-contrib:master Jul 11, 2021
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

Successfully merging this pull request may close these issues.

2 participants