kubernetes-helm: add shell completions

Closes #34508.

Signed-off-by: FX Coudert <fxcoudert@gmail.com>
This commit is contained in:
Igor Kapkov 2018-11-27 20:39:27 +11:00 committed by FX Coudert
parent 43bbc423a0
commit e31f06221e

View file

@ -33,7 +33,13 @@ class KubernetesHelm < Formula
bin.install "bin/helm"
bin.install "bin/tiller"
man1.install Dir["docs/man/man1/*"]
bash_completion.install "scripts/completions.bash" => "helm"
output = Utils.popen_read("SHELL=bash #{bin}/helm completion bash")
(bash_completion/"helm").write output
output = Utils.popen_read("SHELL=zsh #{bin}/helm completion zsh")
(zsh_completion/"_helm").write output
prefix.install_metafiles
end
end