You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/1-essentials/04-console-commands.md
+34-14Lines changed: 34 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -240,7 +240,9 @@ Interactive components are only supported on Mac and Linux. On Windows, Tempest
240
240
241
241
## Shell completion
242
242
243
-
Tempest provides shell completion for Zsh and Bash. This allows you to press `Tab` to autocomplete command names and options.
243
+
Tempest provides shell completion for Zsh and Bash on Linux and macOS. This allows you to press `Tab` to autocomplete command names and options. On Windows, use WSL.
244
+
245
+
Completion relies on two things: a **completion script** sourced by your shell, and a **helper binary** that performs the actual matching. The helper binary is not bundled with Tempest. It is downloaded from the GitHub release matching your installed Tempest version.
244
246
245
247
### Installing completions
246
248
@@ -250,28 +252,46 @@ Run the install command and follow the prompts:
250
252
<dim>./</dim>tempest completion:install
251
253
```
252
254
253
-
The installer will detect your current shell, copy the completion script to the appropriate location, and provide instructions for enabling it.
255
+
This will:
256
+
257
+
1. Detect your shell (or use `--shell=zsh` / `--shell=bash`).
258
+
2. Generate completion metadata (`commands.json`) for all registered commands.
259
+
3. Download the platform-specific helper binary from the matching Tempest release.
260
+
4. Install the completion script to the appropriate location.
254
261
255
-
For Zsh, you'll need to ensure the completions directory is in your `fpath`and reload completions:
262
+
After installation, add the following line to your shell configuration file and restart your terminal:
256
263
257
-
```zsh
258
-
# Add to ~/.zshrc
259
-
fpath=(~/.zsh/completions $fpath)
260
-
autoload -Uz compinit && compinit
264
+
```bash
265
+
# Zsh: add to ~/.zshrc
266
+
source~/.tempest/completion/tempest.zsh
267
+
268
+
# Bash: add to ~/.bashrc
269
+
source~/.tempest/completion/tempest.bash
261
270
```
262
271
263
-
For Bash, source the completion file in your `~/.bashrc`:
272
+
### Keeping completions up to date
264
273
265
-
```bash
266
-
source~/.bash_completion.d/tempest.bash
274
+
After adding or removing commands, regenerate the metadata:
275
+
276
+
```console
277
+
<dim>./</dim>tempest completion:generate
267
278
```
268
279
269
-
### Additional commands
280
+
After updating Tempest to a new version, update the helper binary:
281
+
282
+
```console
283
+
<dim>./</dim>tempest completion:update-bin
284
+
```
270
285
271
-
You may also use these related commands:
286
+
### Available commands
272
287
273
-
-`completion:show` — Output the completion script to stdout (useful for custom installation)
274
-
-`completion:uninstall` — Remove the installed completion script
0 commit comments