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

Document auto-completion files generation #10043

Closed
wants to merge 4 commits into from
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 10 additions & 2 deletions content/en/docs/ops/diagnostic-tools/istioctl/index.md
Expand Up @@ -150,7 +150,11 @@ You will need to download the full Istio release containing the auto-completion

Installing the bash auto-completion file

If you are using bash, the `istioctl` auto-completion file is located in the `tools` directory. To use it, copy the `istioctl.bash` file to your home directory, then add the following line to source the `istioctl` tab completion file from your `.bashrc` file:
If you are using bash, the `istioctl.bash` auto-completion file is located in the `tools` directory.

You can also generate it by running `istioctl collateral completion --bash -o .`.
gonzaloserrano marked this conversation as resolved.
Show resolved Hide resolved

To use it, copy the `istioctl.bash` file to your home directory, then add the following line to source the `istioctl.bash` tab completion file from your `.bashrc` file:
gonzaloserrano marked this conversation as resolved.
Show resolved Hide resolved

{{< text bash >}}
$ source ~/istioctl.bash
Expand All @@ -162,7 +166,11 @@ $ source ~/istioctl.bash

Installing the ZSH auto-completion file

For ZSH users, the `istioctl` auto-completion file is located in the `tools` directory. 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:
For ZSH users, the `_istioctl` auto-completion file is located in the `tools` directory.

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:
Copy link
Contributor

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..

Copy link
Contributor Author

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.


{{< text zsh >}}
source ~/_istioctl
Expand Down