-
Notifications
You must be signed in to change notification settings - Fork 129
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
feat/completion #416
feat/completion #416
Conversation
This builds on top of #415. Will need a rebase once that's merged in. Please review only the last commit. |
Codecov Report
@@ Coverage Diff @@
## main #416 +/- ##
==========================================
- Coverage 47.03% 46.94% -0.09%
==========================================
Files 88 89 +1
Lines 6034 6047 +13
==========================================
+ Hits 2838 2839 +1
- Misses 2873 2885 +12
Partials 323 323
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but see the optional comment.
cmd/completion.go
Outdated
# and source this file from your PowerShell profile. | ||
`, | ||
DisableFlagsInUseLine: true, | ||
ValidArgs: []string{"bash", "zsh", "fish", "powershell"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
optional:
The list of valid choices is defined twice: once in ValidArgs
, then in the switch
.
Suggestion to avoid duplication: remove ValidArgs
, replace cobra.ExactValidArgs
with cobra.ExactArgs
and add a default
case to the switch
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call. Incorporated this change!
No description provided.