Document Bash completion setup

This commit is contained in:
2026-11-03 13:12:36 +00:00
parent f79f446726
commit 8964ad02ad
6 changed files with 38 additions and 5 deletions

View File

@@ -72,7 +72,7 @@ Applications may install shell completion explicitly. When installed, generate
and load the script for the executable name chosen by the application:
```sh
# Bash
# Bash, after initializing bash-completion
source <(app completion bash)
# Zsh, after initializing its completion system with compinit
source <(app completion zsh)
@@ -80,6 +80,18 @@ source <(app completion zsh)
app completion fish | source
```
Bash requires the `bash-completion` package and its helpers in the current
shell. If your startup files do not initialize it, source the package's
initialization file before loading the generated script. For example, on
systems that install it at the following path:
```sh
source /usr/share/bash-completion/bash_completion
source <(app completion bash)
```
Use the path provided by your Bash completion installation.
The application selects the executable basename at installation; use that same
name to invoke the generated script. Completion offers canonical command and
flag names, static values, and file or directory paths where declarations