kubectl: add completion
This commit is contained in:
parent
17c3a114a1
commit
b55f697bd0
2 changed files with 12 additions and 0 deletions
4
srcpkgs/kubernetes/kubectl.INSTALL.msg
Normal file
4
srcpkgs/kubernetes/kubectl.INSTALL.msg
Normal file
|
@ -0,0 +1,4 @@
|
|||
For bash completions, install the 'bash-completion' package.
|
||||
For zsh completions, put the following code in your ~/.zshrc:
|
||||
|
||||
source /usr/share/kubectl/completion.zsh
|
|
@ -21,6 +21,12 @@ conf_files="/etc/kubernetes/*"
|
|||
do_build() {
|
||||
make
|
||||
hack/generate-docs.sh
|
||||
find "_output/local/bin/linux/" -type f -executable | grep "kubectl" | egrep -v "gen|test" | while read line
|
||||
do
|
||||
$line completion bash > completion.bash
|
||||
$line completion zsh > completion.zsh
|
||||
break
|
||||
done
|
||||
}
|
||||
|
||||
do_install() {
|
||||
|
@ -50,6 +56,8 @@ kubectl_package() {
|
|||
pkg_install() {
|
||||
vmove usr/bin/kubectl
|
||||
vmove usr/share/man/man1/kubectl*
|
||||
vinstall completion.bash 644 usr/share/bash-completion/completions kubectl
|
||||
vinstall completion.zsh 644 usr/share/kubectl
|
||||
vlicense LICENSE
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue