From 9b6b1770554fc268ac1d028b167bfd9cda98cc34 Mon Sep 17 00:00:00 2001 From: Mark Cornick Date: Mon, 13 Nov 2017 16:09:09 -0500 Subject: [PATCH] kops: add bash and zsh completions Closes #20601. Signed-off-by: ilovezfs --- Formula/kops.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Formula/kops.rb b/Formula/kops.rb index 59fe70265c..be1c0f0d01 100644 --- a/Formula/kops.rb +++ b/Formula/kops.rb @@ -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