Skip to content

wdx completion

Print the script that completes wdx commands in a shell.

The script asks wdx for the candidates on every Tab, so it completes new commands and flags as soon as wdx is updated. Project and terminal names and ids come from the daemon; nothing is offered when it is not running.

Command What it does
wdx completion bash Print the bash completion script
wdx completion fish Print the fish completion script
wdx completion zsh Print the zsh completion script

Print the bash completion script.

Terminal window
wdx completion bash [flags]

Load it in this shell with source <(wdx completion bash), or for every shell save it as ~/.local/share/bash-completion/completions/wdx; the bash-completion package must be installed. The installer does the latter.

Terminal window
# Print the script
wdx completion bash

The script, and nothing else. With --json: {“shell”: “bash”, “script”: “…”}

Code Exit When
usage 2 the request, command line or a setting is invalid
internal 3 an unexpected failure: database, filesystem or git

Print the fish completion script.

Terminal window
wdx completion fish [flags]

Save it as ~/.config/fish/completions/wdx.fish. The installer does it.

Terminal window
# Print the script
wdx completion fish

The script, and nothing else. With --json: {“shell”: “fish”, “script”: “…”}

Code Exit When
usage 2 the request, command line or a setting is invalid
internal 3 an unexpected failure: database, filesystem or git

Print the zsh completion script.

Terminal window
wdx completion zsh [flags]

Save it as _wdx in a directory of your fpath, such as /.zsh/completions with fpath=(/.zsh/completions $fpath) before compinit in ~/.zshrc. The installer does it.

Terminal window
# Print the script
wdx completion zsh

The script, and nothing else. With --json: {“shell”: “zsh”, “script”: “…”}

Code Exit When
usage 2 the request, command line or a setting is invalid
internal 3 an unexpected failure: database, filesystem or git