-
-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Expand file tree
/
Copy pathdocker-completion.rb
More file actions
35 lines (29 loc) · 1.14 KB
/
docker-completion.rb
File metadata and controls
35 lines (29 loc) · 1.14 KB
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
33
34
35
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/v29.3.1.tar.gz"
sha256 "76a1b916e21c3ade3031fb416025fcdf360c4ab006c5b435585322da36e94dac"
license "Apache-2.0"
compatibility_version 1
head "https://github.com/docker/cli.git", branch: "master"
livecheck do
formula "docker"
end
bottle do
sha256 cellar: :any_skip_relocation, all: "f8cdca4ae9584bc3987a080fa83555774dc27c8fd637ff9d95cf2b4282ffd736"
end
conflicts_with cask: "docker-desktop"
# 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