How to add bash command completion for Docker on Mac OS X?

前端 未结 8 433
渐次进展
渐次进展 2021-02-01 13:24

I am running docker and I want bash command completion for docker commands and parameters.

8条回答
  •  遇见更好的自我
    2021-02-01 13:43

    The completion scripts come with Docker Beta. I want them to stay up to date. So, on OS X...

    • Install homebrew's bash-completion
    • Symlink the files

      find /Applications/Docker.app \
      -type f -name "*.bash-completion" \
      -exec ln -s "{}" "$(brew --prefix)/etc/bash_completion.d/" \;
      

提交回复
热议问题