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

extend the documentation of the command completion of zsh #113

Merged
merged 2 commits into from Jan 28, 2022

Conversation

am3o
Copy link
Contributor

@am3o am3o commented Jan 15, 2022

Description

In the documentation is a little mistake about the zsh completion. The documentation of zsh recommends installing all completions to the $ZSH/cache/completions directory and reloading the completion plugin. The file .zprofile is executed in every new terminal session. So every time the completion is activated. It's more explicit.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Documentation

  • fix the zsh completion inREADME.md

@tarys
Copy link

tarys commented Jan 16, 2022

Nice, thanks a lot!
Looking forward for merge and new release :)

@am3o am3o force-pushed the master branch 2 times, most recently from 0f457cf to 6d2ae81 Compare January 18, 2022 11:00
@am3o
Copy link
Contributor Author

am3o commented Jan 18, 2022

Its a pleasure and i really love the tool!

Sorry for the force pushes, I had to change my git identity

@am3o am3o force-pushed the master branch 2 times, most recently from 6d2ae81 to 36692ff Compare January 20, 2022 08:21
@am3o
Copy link
Contributor Author

am3o commented Jan 20, 2022

I thought a rebase is a good idea and than this happens... i will undo the rebase 😒

@d-rk
Copy link
Collaborator

d-rk commented Jan 20, 2022

@am3o don't worry about it. I will get it merged somehow :)
But first I need to find the time to take a closer look at the PR.

@am3o
Copy link
Contributor Author

am3o commented Jan 20, 2022

Now, it's cleaned up and we are back to the start point. Sorry for the confusing commits.

@d-rk Take your time to proof the PR.

@d-rk
Copy link
Collaborator

d-rk commented Jan 28, 2022

@am3o thank you for the PR.

I updated the PR according to the cobra docs: https://github.com/spf13/cobra/blob/master/shell_completions.md

I'm not an expert when it comes to zsh but:

  • putting the autoload in ~/.zshrc instead of ~/.zprofile seems to be preferred (https://unix.stackexchange.com/a/71258/302068)
  • on a new zsh installation $ZSH/cache/completions/_kafkactl evaluates to /cache/completions/_kafkactl which probably not the correct location. So I keep the location as documented in cobra docs

@d-rk d-rk merged commit c997121 into deviceinsight:main Jan 28, 2022
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.

None yet

3 participants