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

Use native cobra zsh completion script generator instead of wrapper script #40

Merged
merged 2 commits into from
Oct 28, 2019

Conversation

corneliusweig
Copy link
Owner

No description provided.

Cornelius Weig added 2 commits October 27, 2019 20:28
So far, there was a wrapper script to translate bash completion
into zsh code. This now uses the native zsh completion which was
introduced in v0.0.5
The vanilla version assumes that the completion script is generated once
and then put in the zsh completion script folder. This has advantages,
such as better caching, but it breaks the most common use-case
`source <(rakkess completion zsh)`

This commit adds a compdef call which re-enables this usage.

Also see spf13/cobra#887
@codecov-io
Copy link

codecov-io commented Oct 27, 2019

Codecov Report

Merging #40 into master will increase coverage by 0.91%.
The diff coverage is 85.71%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #40      +/-   ##
==========================================
+ Coverage    73.3%   74.22%   +0.91%     
==========================================
  Files          15       15              
  Lines         487      481       -6     
==========================================
  Hits          357      357              
+ Misses        103      100       -3     
+ Partials       27       24       -3
Impacted Files Coverage Δ
cmd/root.go 68.96% <100%> (ø) ⬆️
cmd/completion.go 71.42% <80%> (+15.87%) ⬆️

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 6cf7942...b485582. Read the comment docs.

@corneliusweig corneliusweig merged commit eb1ac91 into master Oct 28, 2019
@corneliusweig corneliusweig deleted the w/zsh-completion branch October 28, 2019 07:45
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.

2 participants