Skip to content

Conversation

@dearchap
Copy link
Contributor

What type of PR is this?

(REQUIRED)

  • bug

What this PR does / why we need it:

(REQUIRED)

Which issue(s) this PR fixes:

(REQUIRED)

Fixes #2209

Special notes for your reviewer:

(fill-in or delete this section)

Testing

(fill-in or delete this section)

go test -run=TestMutuallyExclusiveFlagsCompletion

Release Notes

(REQUIRED)

Add mutually exclusive flags to shell completion

@dearchap dearchap requested a review from a team as a code owner October 19, 2025 23:51
Copy link

@louisroyer louisroyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,
I see that when you provide the flag m1, m2 is wrongly suggested (they are mutually exclusive, so the only proposed flags should be l1, l2 and m1).

Could you add this test case as well, and adapt the code to make it pass?

@dearchap
Copy link
Contributor Author

dearchap commented Nov 2, 2025

@louisroyer m1 and m2 are part of same group and are exclusive with only l2 . l1 is a global flag and will be valid in all cases.

Copy link

@louisroyer louisroyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

m1 and m2 are part of same group and are exclusive with only l2 . l1 is a global flag and will be valid in all cases.

oh, sorry I only tested against the example program from #2209: last 2 commands were not giving expected result, and tried to transpose this to your test scenario that I wrongly read 😅

Here are the test cases I was thinking about:

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.

Mutually exclusive flags are not suggested by shell completion

2 participants