gaojinguan 发表于 2019-2-20 09:50:07

Get Bash completion on Docker Mac-Beleaguered Castle-运维网 博客

  Docker: Installing bash completion
  We will run through the instructions here and show a couple of examples of what it looks like when configured.

[*]  Set up Bash competition through brew
$ brew install bash-completion  
$ brew tap homebrew/completions

[*]  Update your .bashrc or .bash_profile
  This snippet will update your .bashrc file that is executed every time you open a terminal.
  If you don't have a .bashrc file already then you may want to use chmod +x and to add an extra line at the top of the file #!/bin/bash
cat >> ~/.bashrc   Here I type just the first letter and hit tab. This even works with some of the crazy automatically generated container names that Docker can create.
$ docker inspect 9  
$ docker inspect 99b9505c7c18e51b1154e7d95f0e034eac4c9264ff2196501208ffd35644c37c
  Using names:
$ docker rm -f goof  
$ docker rm -f goofy_curie
  So I hope you found this useful - and I'm sure there are lots more ways you can take advantage of this. If you have more hints and hacks for completion let me know in the comments.
See also - swarm mode:
  In Docker 1.12RC we get a native, built-in orchestration model called Swarm Mode. Check out my quick tutorials below:
  Getting started with Swarm Mode


页: [1]
查看完整版本: Get Bash completion on Docker Mac-Beleaguered Castle-运维网 博客