在 Bash 中,配置 Docker Compose 補全,能夠簡化輸入工做、提升輸入準確性。git
第一步、確保已經安裝 Bash Completion 功能;github
第二步、安裝自動補全:docker
mkdir -pv ~/.local/share/bash-completion/completions/ curl -L https://raw.githubusercontent.com/docker/compose/1.27.4/contrib/completion/bash/docker-compose \ -o ~/.local/share/bash-completion/completions/
Command-line completion | Docker Documentationbash