Inspired by a contribution of calbertts in this fzf issue.
What is this?
Auto complete your Docker commands with the currently running containers, using fuzzy search.
Dependencies
Installation
First, install fzf.
Clone the repo in .oh-my-zsh/plugins/fzf-docker
git clone https://github.com/pierpo/fzf-docker ~/.oh-my-zsh/plugins/fzf-docker
Then add the plugin to your .zshrc
# In your .zshrc
plugins=(... fzf-docker ...)
Usage
If you don't like the **
prefix (which is a fzf thing), you may change it in your zshrc
:
export FZF_COMPLETION_TRIGGER='**'
I personally put ,
instead
Command list
docker **<TAB>
Remove images
docker rmi **<TAB>
Start containers
docker start **<TAB>
Stop containers
docker stop **<TAB>
Remove containers
docker rm **<TAB>