-
-
Notifications
You must be signed in to change notification settings - Fork 12.1k
/
docker-completion.rb
32 lines (27 loc) 路 1.07 KB
/
docker-completion.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
class DockerCompletion < Formula
desc "Bash, Zsh and Fish completion for Docker"
homepage "https://www.docker.com/"
url "https://github.com/docker/cli/archive/refs/tags/v26.1.3.tar.gz"
sha256 "d361896cd02deb3bd160c627401eba2cd8e2513a085c55427319bea8c6412ad4"
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: "053630dbbce4ac1d66bdea50103f218a61b07d36035428a8d824d672938a6ae8"
end
# These used to also be provided by the `docker` formula.
link_overwrite "etc/bash_completion.d/docker"
link_overwrite "share/fish/vendor_completions.d/docker.fish"
link_overwrite "share/zsh/site-functions/_docker"
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