dfx completion
Reference
Generate a shell completion script for dfx
.
Basic usage
dfx completion [option] SHELL
The command takes installed extensions into account when generating the completion script, so you should regenerate it after installing or removing extensions.
The values supported for SHELL are bash
, elvish
, fish
, powershell
,
and zsh
. The default value is bash
.
Options
You can use the following option with the dfx completion
command.
Option | Description - |
---|---|
--bin-name <name> | Name of the command. Only needed if referring to dfx by another name, such as with an alias. Default dfx . |
Examples
Generate a bash completion script:
dfx completion
Generate a zsh completion script:
dfx completion zsh
Enable completion in zsh:
source <(dfx completion zsh)
Enable completion in bash:
source <(dfx completion)