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 all 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
24 changes: 20 additions & 4 deletions content/en/docs/ops/diagnostic-tools/istioctl/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,18 @@ 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:

{{< text bash >}}
$ istioctl collateral completion --bash -o .
{{< /text >}}

Copy it to a directory of your choosing (`$HOME` in the example) and then source it from your `.bashrc` file.

{{< text bash >}}
$ source ~/istioctl.bash
$ source $HOME/istioctl.bash
{{< /text >}}

{{< /tab >}}
Expand All @@ -162,10 +170,18 @@ $ 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:

{{< text zsh >}}
$ istioctl collateral completion --zsh -o .
{{< /text >}}

Copy it to a directory of your choosing (`$HOME` in the example) and then source it from your `.zshrc` file.

{{< text zsh >}}
source ~/_istioctl
$ source $HOME/_istioctl
{{< /text >}}

You may also add the `_istioctl` file to a directory listed in the `fpath` variable. To achieve this, place the `_istioctl` file in an existing directory in the `fpath`, or create a new directory and add it to the `fpath` variable in your `~/.zshrc` file.
Expand Down