From b65be7c5525fd78c06f8366d01edd089ae3eae57 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Mon, 23 Jan 2017 15:26:29 +0000 Subject: [PATCH] docker-completion: import from homebrew/completions. --- Formula/docker-completion.rb | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Formula/docker-completion.rb diff --git a/Formula/docker-completion.rb b/Formula/docker-completion.rb new file mode 100644 index 00000000000..0b1f78d1f5d --- /dev/null +++ b/Formula/docker-completion.rb @@ -0,0 +1,23 @@ +class DockerCompletion < Formula + desc "Bash, Zsh and Fish completion for Docker" + homepage "https://github.com/docker/docker" + url "https://github.com/docker/docker/archive/v1.13.0.tar.gz" + sha256 "845cc9a7a48ed1cc60f062882285358a1c2a845b74c5d1d859606a28e4a47d3e" + head "https://github.com/docker/docker" + + bottle :unneeded + + 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