corneliusweig / ketall

Like `kubectl get all`, but get really all resources
Apache License 2.0
679 stars 28 forks source link

Fix shell completion #155

Closed marckhouzam closed 3 years ago

marckhouzam commented 3 years ago

Fixes #154

This PR redirects errors to stderr because the shell completion provided by Cobra (specifically the __complete command) needs it.

Before the fix

$ ./ketall <TAB>
completion   -- generate the autocompletion script for the specified shell
help         -- Help about any command
version      -- Print the version information
:4           Completion ended with directive: ShellCompDirectiveNoFileComp

After the fix

$ ./ketall <TAB>
completion   -- generate the autocompletion script for the specified shell
help         -- Help about any command
version      -- Print the version information

To reproduce the problem:

make dev
source <(./ketall completion zsh)
compdef _ketall ketall
./ketall <TAB>
codecov-commenter commented 3 years ago

Codecov Report

Merging #155 (53ced8c) into master (bb67dba) will increase coverage by 0.22%. The diff coverage is 50.00%.

:exclamation: Current head 53ced8c differs from pull request most recent head f6f3143. Consider uploading reports for the commit f6f3143 to get more accurate results Impacted file tree graph

@@            Coverage Diff             @@
##           master     #155      +/-   ##
==========================================
+ Coverage   33.89%   34.12%   +0.22%     
==========================================
  Files           8        8              
  Lines         416      422       +6     
==========================================
+ Hits          141      144       +3     
- Misses        262      264       +2     
- Partials       13       14       +1     
Impacted Files Coverage Δ
cmd/root.go 74.46% <50.00%> (-3.59%) :arrow_down:

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 bb67dba...f6f3143. Read the comment docs.

marckhouzam commented 3 years ago

Thank you, Marc, for bringing this to Cobra and then taking care of small projects like this!

Oh and of course, thank you for this great plugin. I've been using it for a couple years!

corneliusweig commented 3 years ago

Awesome! Thank you! This would have been hard to track down for me.