Shell completion
Enable tab completion for bash, zsh, and fish shells.
Install completion
The command appends completion setup to your shell profile. Restart your shell or source the profile afterwards.
dg completion with no shell argument detects the shell from $SHELL. Without --install, dg completion bash (or zsh, or fish) prints the setup line and installs nothing.
Current shell session
To enable Bash completion only for the current session:
For zsh:
For fish:
What gets completed
- Commands:
dg listen,dg speak,dg read, etc. - Options: command options such as
--micand--model, and root options such as-o - Values for choice options, such as
json,yaml,table, andcsvafter-o
The installed setup reads completions from the current dg command, so a CLI update is reflected automatically.