feat: bash-completion, remove zsh

This commit is contained in:
ange 2024-06-26 22:52:06 +02:00
parent f2464c73f7
commit d4d3c1af55
Signed by: ange
GPG key ID: 9E0C4157BB7BEB1D
24 changed files with 41 additions and 1460 deletions

View file

@ -0,0 +1 @@
complete -F _command doas

View file

@ -0,0 +1,6 @@
function _gi() {
mapfile -t COMPREPLY < <(compgen -W \
"$(curl -sfL https://www.toptal.com/developers/gitignore/api/list | tr ',' '\n')" \
-- "${COMP_WORDS[1]}")
}
complete -F _gi gi

View file

@ -0,0 +1,2 @@
. /usr/share/bash-completion/completions/kubectl
complete -F __start_kubectl k

View file

@ -0,0 +1,6 @@
function _kctx() {
mapfile -t COMPREPLY < <(compgen -W \
"$(kubectl config get-contexts -o name)" \
-- "${COMP_WORDS[1]}")
}
complete -F _kctx kctx

View file

@ -0,0 +1,6 @@
function _kns() {
mapfile -t COMPREPLY < <(compgen -W \
"$(kubectl get namespace -o jsonpath='{..metadata.name}')" \
-- "${COMP_WORDS[1]}")
}
complete -F _kns kns