kubectl: add completion
This commit is contained in:
committed by
Enno Boland
parent
17c3a114a1
commit
b55f697bd0
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() {
|
do_build() {
|
||||||
make
|
make
|
||||||
hack/generate-docs.sh
|
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() {
|
do_install() {
|
||||||
@@ -50,6 +56,8 @@ kubectl_package() {
|
|||||||
pkg_install() {
|
pkg_install() {
|
||||||
vmove usr/bin/kubectl
|
vmove usr/bin/kubectl
|
||||||
vmove usr/share/man/man1/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
|
vlicense LICENSE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user