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

Automatically suggest --target when a plugin name is ambiguous #553

Merged

Conversation

marckhouzam
Copy link
Contributor

@marckhouzam marckhouzam commented Oct 19, 2023

What this PR does / why we need it

Complete --target when a plugin name is ambiguous.

Please see the testing section for examples.

Which issue(s) this PR fixes

Fixes # N/A

Describe testing done for PR

$ tz plugin install cluster <TAB>
$ tz plugin install cluster --target

$ tz plugin install cluster --target k8s <TAB>
This command does not take any more arguments (but may accept flags).

$ tz plugin upgrade cluster <TAB>
$ tz plugin upgrade cluster --target

$ tz plugin upgrade cluster --target tmc <TAB>
This command does not take any more arguments (but may accept flags).

$ tz plugin delete cluster <TAB>
$ tz plugin delete cluster --target

$ tz plugin delete cluster --target tmc <TAB>
This command does not take any more arguments (but may accept flags).

$ tz plugin describe cluster <TAB>
$ tz plugin describe cluster --target

$ tz plugin describe cluster --target tmc <TAB>
This command does not take any more arguments (but may accept flags).

Release note

Automatically suggest the `--target` flag in shell completion when a plugin name is ambiguous.

Additional information

Special notes for your reviewer

Copy link
Contributor

@anujc25 anujc25 left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks.

PR needs a rebase after #552 is merged.

For example:
$ tz plugin install cluster <TAB>
$ tz plugin install cluster --target

Signed-off-by: Marc Khouzam <kmarc@vmware.com>
@marckhouzam marckhouzam merged commit 520dc86 into vmware-tanzu:main Oct 20, 2023
6 checks passed
@marckhouzam marckhouzam deleted the feat/activeHelpNeedTarget branch October 20, 2023 18:52
@marckhouzam marckhouzam added this to the 1.1.0 milestone Oct 20, 2023
mpanchajanya pushed a commit that referenced this pull request Oct 24, 2023
For example:
$ tz plugin install cluster <TAB>
$ tz plugin install cluster --target

Signed-off-by: Marc Khouzam <kmarc@vmware.com>
(cherry picked from commit 520dc86)
mpanchajanya pushed a commit that referenced this pull request Oct 24, 2023
For example:
$ tz plugin install cluster <TAB>
$ tz plugin install cluster --target

Signed-off-by: Marc Khouzam <kmarc@vmware.com>
(cherry picked from commit 520dc86)
mpanchajanya pushed a commit that referenced this pull request Oct 24, 2023
For example:
$ tz plugin install cluster <TAB>
$ tz plugin install cluster --target

Signed-off-by: Marc Khouzam <kmarc@vmware.com>
(cherry picked from commit 520dc86)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants