32 lines
949 B
Ruby
32 lines
949 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.18",
|
|
revision: "b40c2f6b5deeb11ac6c485c940865ee40664f0f0"
|
|
license "Apache-2.0"
|
|
head "https://github.com/docker/cli.git", branch: "master"
|
|
|
|
livecheck do
|
|
formula "docker"
|
|
end
|
|
|
|
bottle do
|
|
sha256 cellar: :any_skip_relocation, all: "d9471cceab709622ee017ed0dfbecfe0c3df1b34060da23e31fdf965e7e1d693"
|
|
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
|