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

Stop command aliases and flag aliases from being suggested in shell completion #1876

Closed

Conversation

bartekpacia
Copy link
Member

@bartekpacia bartekpacia commented Mar 11, 2024

What type of PR is this?

  • bug fix

Which issue(s) this PR fixes:

This PR fixes #1875

Release Notes

- Command aliases and flag aliases are no longer included in shell completions (#1876)

@bartekpacia bartekpacia requested a review from a team as a code owner March 11, 2024 02:04
@bartekpacia
Copy link
Member Author

Should I make the same PR but for v3 branch?

@bartekpacia bartekpacia changed the title printCommandSuggestions: omit Command aliases from suggesting Omit command aliases and flag aliases from being suggested in shell completion Mar 11, 2024
@bartekpacia bartekpacia changed the title Omit command aliases and flag aliases from being suggested in shell completion Stop command aliases and flag aliases from being suggested in shell completion Mar 11, 2024
app_test.go Outdated Show resolved Hide resolved
- printCommandSuggestions: omit Command aliases from suggesting
- printFlagSuggestions: omit Flag aliases from suggesting
- fix tests
Copy link
Contributor

@Juneezee Juneezee left a comment

Choose a reason for hiding this comment

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

LGTM. Other users may prefer the original behaviour so I'm looking for more inputs from other reviewers.

@hay-kot
Copy link
Contributor

hay-kot commented Mar 14, 2024

+1 This is what I'd expect over the original.

@bartekpacia
Copy link
Member Author

Thanks for the reviews (and for being maintainers of this module!)

Should I make the same PR but for v3 branch?

@bartekpacia
Copy link
Member Author

polite ping @hay-kot @Juneezee :) I hope you're okay!

@Juneezee Juneezee requested a review from dearchap March 27, 2024 01:00
@dearchap
Copy link
Contributor

dearchap commented Apr 1, 2024

@bartekpacia I agree with @Juneezee . This breaks peoples current expectation of how the completion works. If you want to have this feature it would be better to define a new bool var in Command, something like "DisableAliasInCompletion" which when explicity set to true would show the behaviour that you want. Also note that v2 is in maint and no new features/API/breaking changes are allowed. v3 is the place for this. Unless you have a strong reason to use v2 instead of v3 I would suggest you close this PR and apply the patch in v3.

@bartekpacia
Copy link
Member Author

Understood, thank you for review @dearchap! I'll soon make another PR targeting v3.

@bartekpacia bartekpacia closed this Apr 3, 2024
@bartekpacia bartekpacia deleted the v2/fix/completion_aliases branch April 3, 2024 22:31
@bartekpacia bartekpacia restored the v2/fix/completion_aliases branch April 3, 2024 22:31
@bartekpacia bartekpacia deleted the v2/fix/completion_aliases branch April 3, 2024 22:31
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.

None yet

4 participants