mirror of
https://github.com/fluxcd/flux2.git
synced 2026-02-21 15:11:47 +00:00
Merge pull request #1855 from darklore/shell-completion-homebrew
Add shell completion installation to homebrew formula
This commit is contained in:
commit
0651064999
1 changed files with 11 additions and 0 deletions
|
|
@ -52,6 +52,17 @@ brews:
|
||||||
dependencies:
|
dependencies:
|
||||||
- name: kubectl
|
- name: kubectl
|
||||||
type: optional
|
type: optional
|
||||||
|
install: |
|
||||||
|
bin.install "flux"
|
||||||
|
|
||||||
|
bash_output = Utils.safe_popen_read(bin/"flux", "completion", "bash")
|
||||||
|
(bash_completion/"flux").write bash_output
|
||||||
|
|
||||||
|
zsh_output = Utils.safe_popen_read(bin/"flux", "completion", "zsh")
|
||||||
|
(zsh_completion/"_flux").write zsh_output
|
||||||
|
|
||||||
|
fish_output = Utils.safe_popen_read(bin/"flux", "completion", "fish")
|
||||||
|
(fish_completion/"flux.fish").write fish_output
|
||||||
test: |
|
test: |
|
||||||
system "#{bin}/flux --version"
|
system "#{bin}/flux --version"
|
||||||
publishers:
|
publishers:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue