urfave / cli

A simple, fast, and fun package for building command line apps in Go
https://cli.urfave.org
MIT License
21.89k stars 1.69k forks source link

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

Closed bartekpacia closed 2 months ago

bartekpacia commented 3 months ago

What type of PR is this?

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 commented 3 months ago

Should I make the same PR but for v3 branch?

hay-kot commented 3 months ago

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

bartekpacia commented 3 months ago

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

Should I make the same PR but for v3 branch?

bartekpacia commented 3 months ago

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

dearchap commented 2 months ago

@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 commented 2 months ago

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