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

feat/completion #416

Merged
merged 1 commit into from
May 27, 2021
Merged

feat/completion #416

merged 1 commit into from
May 27, 2021

Conversation

hbagdi
Copy link
Member

@hbagdi hbagdi commented May 26, 2021

No description provided.

@hbagdi hbagdi requested a review from a team as a code owner May 26, 2021 06:42
@hbagdi
Copy link
Member Author

hbagdi commented May 26, 2021

This builds on top of #415. Will need a rebase once that's merged in. Please review only the last commit.

@codecov-commenter
Copy link

codecov-commenter commented May 26, 2021

Codecov Report

Merging #416 (811979b) into main (7102c0c) will decrease coverage by 0.08%.
The diff coverage is 7.69%.

Impacted file tree graph

@@            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              
Impacted Files Coverage Δ
cmd/completion.go 7.69% <7.69%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7102c0c...811979b. Read the comment docs.

Copy link
Contributor

@mflendrich mflendrich left a 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.

# and source this file from your PowerShell profile.
`,
DisableFlagsInUseLine: true,
ValidArgs: []string{"bash", "zsh", "fish", "powershell"},
Copy link
Contributor

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.

Copy link
Member Author

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!

@hbagdi hbagdi merged commit 5fb41db into main May 27, 2021
@hbagdi hbagdi deleted the feat/completion branch May 27, 2021 20:29
AntoineJac pushed a commit that referenced this pull request Jan 23, 2024
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.

3 participants