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

前端 未结 8 434
渐次进展
渐次进展 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:37

    Just to be said: if you use brew: brew install docker will do all what you need. It includes brew link docker which installs the completion into `brew --prefix`/etc/bash_completion.d/docker same topic, same answer for docker-machine, docker-compose, etc. ...

    else (perhaps you are using Docker Beta (new "more native" docker installation package without Virtualbox) you still have to add it manually, then follow Michael's answer plus have a look at the additional completion scripts for docker-machine, docker-compose and some shell-helper that are handled in the 'script' from CodeCorrupt

提交回复
热议问题