homebrew-core/Formula/docker-compose-completion.rb
2017-11-08 22:49:40 -08: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.17.1.tar.gz"
sha256 "71f7b98af30c12bd4cf69421a09d16edecefb9d0b5e127934c5c832380ea78ba"
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