31 lines
888 B
Ruby
31 lines
888 B
Ruby
class DockerCompletion < Formula
|
|
desc "Bash, Zsh and Fish completion for Docker"
|
|
homepage "https://www.docker.com/"
|
|
url "https://github.com/docker/cli.git",
|
|
tag: "v20.10.12",
|
|
revision: "e91ed5707e038b02af3b5120fa0835c5bedfd42e"
|
|
license "Apache-2.0"
|
|
|
|
livecheck do
|
|
formula "docker"
|
|
end
|
|
|
|
bottle do
|
|
sha256 cellar: :any_skip_relocation, all: "9f0d9def451d90b6e4c93b329dbbc4e2572897c1d32d5d9bee0df6a492672e43"
|
|
end
|
|
|
|
conflicts_with "docker",
|
|
because: "docker already includes these completion scripts"
|
|
|
|
def install
|
|
bash_completion.install "contrib/completion/bash/docker"
|
|
fish_completion.install "contrib/completion/fish/docker.fish"
|
|
zsh_completion.install "contrib/completion/zsh/_docker"
|
|
end
|
|
|
|
test do
|
|
assert_match "-F _docker",
|
|
shell_output("bash -c 'source #{bash_completion}/docker && complete -p docker'")
|
|
end
|
|
end
|