Skip to content

Instantly share code, notes, and snippets.

@ptrm
ptrm / install_docker_bash_completions.sh
Created December 16, 2019 10:09 — forked from toschneck/install_docker_bash_completions.sh
Install Docker and Docker-Compose bash completion
#!/usr/bin/env bash
set -e
echo "install docker bash completion"
curl -f -L "https://raw.githubusercontent.com/docker/docker-ce/$(docker version --format '{{.Server.Version}}' | sed -E 's/((\.?[^.]+){2}).*/\1/')/components/cli/contrib/completion/bash/docker" -o /etc/bash_completion.d/docker
echo "install docker-compose bash completion"
curl -f -L https://raw.githubusercontent.com/docker/compose/$(docker-compose version --short)/contrib/completion/bash/docker-compose -o /etc/bash_completion.d/docker-compose
echo ".... done!"