There is no simple and built-in way to install the completion scripts (see the bash script installation).
A better way would be to output the scripts with a docker command, like kubectl does:
$ docker completion bash
...
# install the zsh completion
$ echo"source <(docker completion zsh)">>~/.zshrc
There is no simple and built-in way to install the completion scripts (see the bash script installation).
A better way would be to output the scripts with a docker command, like kubectl does: