pulumi: zsh and bash completion

Closes #33670.

Signed-off-by: FX Coudert <fxcoudert@gmail.com>
This commit is contained in:
Todd Brown 2018-11-02 21:38:08 -05:00 committed by FX Coudert
parent 59c560b300
commit 1054f57647

View file

@ -25,6 +25,14 @@ class Pulumi < Formula
system "make", "dist"
bin.install Dir["#{buildpath}/bin/*"]
prefix.install_metafiles
# Install bash completion
output = Utils.popen_read("#{bin}/pulumi gen-completion bash")
(bash_completion/"pulumi").write output
# Install zsh completion
output = Utils.popen_read("#{bin}/pulumi gen-completion zsh")
(zsh_completion/"_pulumi").write output
end
end