From c7efa4735c3bbe05decb532dcc409bc37fb7f631 Mon Sep 17 00:00:00 2001 From: Buddy Sandidge Date: Fri, 26 May 2023 15:30:10 -0700 Subject: [PATCH] Add trubka completion --- dot_config/bash/bashrc.d/completion.sh.tmpl | 31 ++++++++++----------- dot_config/bash/bashrc.d/helm.sh.tmpl | 6 ---- 2 files changed, 15 insertions(+), 22 deletions(-) delete mode 100644 dot_config/bash/bashrc.d/helm.sh.tmpl diff --git a/dot_config/bash/bashrc.d/completion.sh.tmpl b/dot_config/bash/bashrc.d/completion.sh.tmpl index 94e6e87..5635ca6 100644 --- a/dot_config/bash/bashrc.d/completion.sh.tmpl +++ b/dot_config/bash/bashrc.d/completion.sh.tmpl @@ -1,14 +1,12 @@ #!/usr/bin/env bash {{ if stat "/etc/bash_completion" -}} -# shellcheck disable=SC1091 source /etc/bash_completion -{{- end }} +{{ end -}} {{ if stat "/usr/local/etc/bash_completion" -}} -# shellcheck disable=SC1091 source /usr/local/etc/bash_completion -{{- end }} +{{ end -}} {{ if stat "/usr/local/etc/bash_completion.d/" -}} for i in $(ls /usr/local/etc/bash_completion.d/); do @@ -18,35 +16,36 @@ for i in $(ls /usr/local/etc/bash_completion.d/); do fi done unset i -{{- end }} +{{ end -}} {{ if lookPath "brew" -}} -# vi: ft=bash -if command -v brew &> /dev/null; then - if [ -f "$(brew --prefix)/share/bash-completion/bash_completion" ]; then - . "$(brew --prefix)/share/bash-completion/bash_completion" - fi +if [ -f "$(brew --prefix)/share/bash-completion/bash_completion" ]; then + . "$(brew --prefix)/share/bash-completion/bash_completion" fi -{{- end }} +{{ end -}} {{ if lookPath "direnv" -}} eval "$(direnv hook bash)" -{{- end }} +{{ end -}} {{ if lookPath "erd" -}} eval "$(erd --completions bash)" -{{- end }} +{{ end -}} {{ if lookPath "helm" -}} source <(helm completion bash) -{{- end }} +{{ end -}} {{ if lookPath "kubectl" -}} source <(kubectl completion bash) -{{- end }} +{{ end -}} {{ if lookPath "starship" -}} source <(starship init bash) -{{- end }} +{{ end -}} + +{{ if lookPath "trubka" -}} +eval "$(trubka --completion-script-bash)" +{{ end -}} # vim: filetype=bash diff --git a/dot_config/bash/bashrc.d/helm.sh.tmpl b/dot_config/bash/bashrc.d/helm.sh.tmpl deleted file mode 100644 index 4b94c48..0000000 --- a/dot_config/bash/bashrc.d/helm.sh.tmpl +++ /dev/null @@ -1,6 +0,0 @@ -{{ if lookPath "helm" -}} -# vi: ft=bash -if command -v helm > /dev/null 2>&1; then - source <(helm completion bash) -fi -{{- end }}