fix(bash): alias completion

This commit is contained in:
ange 2024-07-02 14:26:32 +02:00
parent d4d3c1af55
commit 2d8685c8e4
Signed by: ange
GPG key ID: 9E0C4157BB7BEB1D
19 changed files with 332 additions and 310 deletions

View file

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

View file

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

View file

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

View file

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

View file

@ -0,0 +1,2 @@
. /usr/share/bash-completion/completions/pacman
complete -F _pacman pac