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

Improve documentation for Zsh autocompletion #781

Closed
trawler opened this issue Mar 17, 2021 · 3 comments · Fixed by #3961
Closed

Improve documentation for Zsh autocompletion #781

trawler opened this issue Mar 17, 2021 · 3 comments · Fixed by #3961
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@trawler
Copy link
Contributor

trawler commented Mar 17, 2021

What happened?
The existing documentation on how to enable zsh auto-completion is incorrect/missing information.

Expected behavior
In this page: https://docs.k0sproject.io/v0.11.0/install/#zsh

The following should be removed:

# To load completions for each session, execute once:
$ k0s completion zsh > "${fpath[1]}/_k0s"

and replaced by

$ echo "source <(k0s completion zsh)" >> ~/.zshrc
@trawler trawler added bug Something isn't working documentation Improvements or additions to documentation labels Mar 17, 2021
@jnummelin jnummelin added enhancement New feature or request and removed bug Something isn't working labels Dec 20, 2021
@github-actions
Copy link
Contributor

The issue is marked as stale since no activity has been recorded in 30 days

@github-actions github-actions bot added the Stale label Jan 19, 2022
@kke
Copy link
Contributor

kke commented Jan 20, 2022

That would run k0s on every shell invocation, not a best practice.

The usual way is something like:

k0s completion zsh > /usr/local/share/zsh/site-functions/_k0s

@kke
Copy link
Contributor

kke commented Jan 20, 2022

The current example of doing:

k0s completion zsh > "${fpath[1]}/_k0s"

may end up writing the file somewhere weird if you're using some zsh plugin framework, for example on my system it would go to /Users/kimmo/Library/Caches/antibody/https-COLON--SLASH--SLASH-github.com-SLASH-robbyrussell-SLASH-oh-my-zsh/functions.

@github-actions github-actions bot removed the Stale label Jan 20, 2022
@twz123 twz123 linked a pull request Jan 19, 2024 that will close this issue
16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants