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
Document auto-completion files generation #10043
Conversation
😊 Welcome! This is either your first contribution to the Istio documentation repo, or
Thanks for contributing! Courtesy of your friendly welcome wagon. |
Hi @gonzaloserrano. Thanks for your PR. I'm waiting for a istio member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
||
You can also generate it by running `istioctl collateral completion --zsh -o .`. | ||
|
||
Copy the `_istioctl` file to your home directory, or any directory of your choosing (update directory in script snippet below), and source the `_istioctl` auto-completion file in your `.zshrc` file as follows: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think the normal way to add a completion file is to source it with .zsh. Normally it would be placed so it was found in FPATH or in a folder on FPATH..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be honest, I don't have enough ZSH knowledge to hell. These were the previous instructions.
/ok-to-test |
@ericvn I fixed most of it I think, but the |
Tide is only waiting now on approval; all the tests have passed. Thanks! |
Another issue is that I believe these commands need to be updated for 1.11 (current master) to Pointer to some docs on enabling for bash/zsh: https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/#enable-shell-autocompletion. In the above, they simply source the generated file. The benefit of that is that any changes made will automatically happen with istioctl is updated). |
As #33787 has been merged to master, we could use for bash:
for zsh:
|
@silenceshell I'm running macOS Big Sur and I don't have neither ➜ ~ ls /usr/local
bin lib |
Looking at a machine with a fresh Big Sur install I only see the What does the mean for instructions for a Mac? Do we just say to install in a directory on the fpath as I stated above? Might we say the same for Linux (removing the idea of pointing it in the first fpath entry)? |
That could work, e.g tell the user to list Not sure how it works for linux though. |
Linux and Mac using zsh should be the same in that respect. Since old MacOS had bash and now it's zsh, you really can't default to one. I think it's bash vs zsh and ignore the OS. I might have some time over the weekend to add some more comments within the text. |
@ericvn any idea on how to unblock this? Thanks |
@gonzaloserrano There is at least one issue in that the doc uses |
I did not find the autocompletion files for
istioctl
, after searching I found this issue comment istio/istio#19297 (comment) and I thought could be interesting to add it to the docs.And to help us figure out who should review this PR, please
put an X in all the areas that this PR affects.