Skip to content

Commit e70a31a

Browse files
authored
docs: document the CLI completion subcommand (#13033)
1 parent a7c6fdd commit e70a31a

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

docs/cli-options.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,25 @@ wasmtime config new
200200

201201
And that'll print out the path to the file you can edit.
202202

203+
## `completion`
204+
205+
This subcommand generates shell completion scripts for the `wasmtime` CLI.
206+
Shells install completion scripts in different locations, so refer to your
207+
shell's documentation for the right place to store or evaluate the generated
208+
output.
209+
210+
For example, to install completions for the `fish` shell:
211+
212+
```console
213+
wasmtime completion fish > ~/.config/fish/completions/wasmtime.fish
214+
```
215+
216+
For shells such as `zsh`, the generated script can also be evaluated directly:
217+
218+
```console
219+
eval "$(wasmtime completion zsh)"
220+
```
221+
203222
## `compile`
204223

205224
This subcommand is used to Ahead-Of-Time (AOT) compile a WebAssembly module to produce

0 commit comments

Comments
 (0)