kops: add bash and zsh completions

Closes #20601.

Signed-off-by: ilovezfs <ilovezfs@icloud.com>
This commit is contained in:
Mark Cornick 2017-11-13 16:09:09 -05:00 committed by ilovezfs
parent 5f8274b12c
commit 9b6b177055

View file

@ -27,6 +27,14 @@ class Kops < Formula
kopspath.install Dir["*"]
system "make", "-C", kopspath
bin.install("bin/kops")
# Install bash completion
output = Utils.popen_read("#{bin}/kops completion bash")
(bash_completion/"kops").write output
# Install zsh completion
output = Utils.popen_read("#{bin}/kops completion zsh")
(zsh_completion/"_kops").write output
end
test do