homebrew-core/Formula/docker-compose-completion.rb
2018-03-21 23:52:54 -07:00

22 lines
772 B
Ruby

class DockerComposeCompletion < Formula
desc "Docker-compose completion script"
homepage "https://docs.docker.com/compose/completion/"
url "https://github.com/docker/compose/archive/1.20.1.tar.gz"
sha256 "49a0e2c7a49a5b161c3e74dfdae8173e18174b1fcd8d7675c556a988f0ed95d1"
head "https://github.com/docker/compose.git"
bottle :unneeded
conflicts_with "docker-compose",
:because => "docker-compose already includes completion scripts"
def install
bash_completion.install "contrib/completion/bash/docker-compose"
zsh_completion.install "contrib/completion/zsh/_docker-compose"
end
test do
assert_match "-F _docker_compose",
shell_output("bash -c 'source #{bash_completion}/docker-compose && complete -p docker-compose'")
end
end