homebrew-core/Formula/docker-compose-completion.rb

23 lines
772 B
Ruby
Raw Normal View History

class DockerComposeCompletion < Formula
desc "docker-compose completion script"
homepage "https://docs.docker.com/compose/completion/"
url "https://github.com/docker/compose/archive/1.11.0.tar.gz"
sha256 "71b1040898954a53b14e0823fb4b767b31bc5b355ee7ad1fdf4b2aa393fe2520"
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