fix(bash): alias completion
This commit is contained in:
parent
d4d3c1af55
commit
2d8685c8e4
19 changed files with 332 additions and 310 deletions
|
@ -1 +0,0 @@
|
|||
complete -F _command doas
|
|
@ -1,2 +0,0 @@
|
|||
. /usr/share/bash-completion/completions/kubectl
|
||||
complete -F __start_kubectl k
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
2
.local/share/bash-completion/completions/pac
Normal file
2
.local/share/bash-completion/completions/pac
Normal file
|
@ -0,0 +1,2 @@
|
|||
. /usr/share/bash-completion/completions/pacman
|
||||
complete -F _pacman pac
|
Loading…
Add table
Add a link
Reference in a new issue