completion
Synopsis
Section titled “Synopsis”gapline completion <shell> [--install]Description
Section titled “Description”completion prints a shell completion script for gapline to stdout, or installs it into the shell’s standard completion directory when --install is passed.
Completion covers:
- Every sub-command and its flags.
- The 17 CRUD targets (
stops,routes,trips, …). - Rule IDs, dynamically suggested from the rules registered with this build — useful for
--disable-rule.
Arguments
Section titled “Arguments”| Argument | Values |
|---|---|
<shell> | bash, zsh, fish, elvish, powershell. |
Options
Section titled “Options”| Flag | Short | Description |
|---|---|---|
--install | Install the generated script into the shell’s standard completion directory instead of writing it to stdout. Supported for bash, zsh, and fish. |
Global flags are listed on reference/global-flags.
Examples
Section titled “Examples”Generate the script to stdout
Section titled “Generate the script to stdout”gapline completion bashgapline completion zshgapline completion fishgapline completion elvishgapline completion powershellInstall for the current user
Section titled “Install for the current user”gapline completion bash --installgapline completion zsh --installgapline completion fish --installRestart your shell or source the new file to pick up the completions.
Manual install fallback
Section titled “Manual install fallback”If --install is not available for your shell (or you prefer an explicit path), redirect the generated script yourself:
gapline completion bash > ~/.local/share/bash-completion/completions/gaplinegapline completion zsh > "${fpath[1]}/_gapline"gapline completion fish > ~/.config/fish/completions/gapline.fishTroubleshooting
Section titled “Troubleshooting”- Nothing completes after install. Most shells load completion scripts on startup. Open a new terminal or
sourcethe new file. zshreports “_arguments:comparguments:327: can only be called from completion function”. Make surecompinitruns in your.zshrcbefore the completion file is sourced.- Rule IDs do not complete. The dynamic rule-ID completer needs the binary on your
PATH. Verify withgapline --version.
Exit codes
Section titled “Exit codes”| Code | Meaning |
|---|---|
0 | Script generated or installed successfully. |
3 | Installation failed (permission denied, directory not writable). |
See concepts/exit-codes for the complete table.
See also
Section titled “See also”- Getting started / Shell completion — step-by-step setup.
gapline rules list— every rule ID that completion suggests.