bash_completion additions

This commit is contained in:
fanyx 2022-10-17 15:15:09 +02:00
parent 4dc445c411
commit c8d12cc9ba
3 changed files with 4 additions and 2 deletions

1
.alias
View File

@ -16,7 +16,6 @@ alias mkdir="mkdir -p"
# k8s # k8s
alias k="kubectl" alias k="kubectl"
complete -F __start_kubectl k
which kubectx kubens &>/dev/null && \ which kubectx kubens &>/dev/null && \
alias kx="kubectx" && \ alias kx="kubectx" && \

3
.config/completions/k Normal file
View File

@ -0,0 +1,3 @@
# alias for kubectl to k
complete -o default -F __start_kubectl k

View File

@ -17,7 +17,7 @@ _sv()
;; ;;
*) *)
COMPREPLY=( /var/service/* ) COMPREPLY=( /var/service/* )
COMPREPLY+=( /home/hendrik/sv/* ) COMPREPLY+=( ${HOME}/sv/* )
COMPREPLY=( ${COMPREPLY[@]##*/} ) COMPREPLY=( ${COMPREPLY[@]##*/} )
COMPREPLY=( "${COMPREPLY[@]/README.md}" ) COMPREPLY=( "${COMPREPLY[@]/README.md}" )
COMPREPLY=( $(compgen -W '${COMPREPLY[@]}' -- ${cur}) ) COMPREPLY=( $(compgen -W '${COMPREPLY[@]}' -- ${cur}) )