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 values shown for wrong option #106

Merged
merged 2 commits into from
Jul 12, 2023

Conversation

ZanyMonk
Copy link
Contributor

@ZanyMonk ZanyMonk commented Jun 21, 2023

When completing option values, only values corresponding to the option being completed should be shown.

Following exemples are based on a command looking like this:

@click.command()
@click.option('-a', type=click.Choice(['a_val1', 'a_val2']))
@click.option('-b', type=click.Choice(['b_val1', 'b_val2']))
def cli():
    pass

Before

> cmd -a <TAB>
               a_val1
               a_val2
               b_val1
               b_val2

After

> cmd -a <TAB>
               a_val1
               a_val2

@ZanyMonk ZanyMonk changed the title Fix values for wrong option Fix values shown for wrong option Jun 21, 2023
@auvipy
Copy link
Collaborator

auvipy commented Jul 11, 2023

@GhostOps77 can you try and review it please?

@GhostOps77
Copy link
Contributor

GhostOps77 commented Jul 12, 2023

@auvipy yep, everything looks good and works well as expected!
No issues in here
You can merge this PR

@auvipy auvipy merged commit 79060f1 into click-contrib:master Jul 12, 2023
32 checks passed
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.

3 participants