Skip to content

Commit bd70135

Browse files
authored
Merge pull request #928 from twobiers/shell-completions
Add autocompletion for CLI docs
2 parents 7b445dc + a934013 commit bd70135

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

content/master/cli/_index.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,21 @@ By default the CLI installs from the `XP_CHANNEL` named `stable` and the
6161
For example, to install CLI version `v1.14.0` add `XP_VERSION=v1.14.0` to the
6262
download script curl command:
6363

64-
`curl -sL "https://raw.githubusercontent.com/crossplane/crossplane/main/install.sh" | XP_VERSION=v1.14.0 sh`
64+
`curl -sL "https://raw.githubusercontent.com/crossplane/crossplane/main/install.sh" | XP_VERSION=v1.14.0 sh`
65+
66+
## Installing shell autocompletions
67+
68+
The Crossplane CLI supports shell autocompletions for `bash`, `zsh` and `fish`.
69+
You can install the autocompletions with the `completions` command by adding it to
70+
your shell's configuration file.
71+
72+
```shell
73+
source <(crossplane completions)
74+
```
75+
76+
{{<hint "note" >}}
77+
The `completions` command generates the autocompletions for your default shell.
78+
It's not possible to generate autocompletions for a different shell, if you want to
79+
install the autocompletions for a different shell, you have to configure the Crossplane
80+
CLI as the completer manually.
81+
{{< /hint >}}

0 commit comments

Comments
 (0)