Add trubka completion

main
Buddy Sandidge 2 years ago
parent 733832a592
commit c7efa4735c

@ -1,14 +1,12 @@
#!/usr/bin/env bash #!/usr/bin/env bash
{{ if stat "/etc/bash_completion" -}} {{ if stat "/etc/bash_completion" -}}
# shellcheck disable=SC1091
source /etc/bash_completion source /etc/bash_completion
{{- end }} {{ end -}}
{{ if stat "/usr/local/etc/bash_completion" -}} {{ if stat "/usr/local/etc/bash_completion" -}}
# shellcheck disable=SC1091
source /usr/local/etc/bash_completion source /usr/local/etc/bash_completion
{{- end }} {{ end -}}
{{ if stat "/usr/local/etc/bash_completion.d/" -}} {{ if stat "/usr/local/etc/bash_completion.d/" -}}
for i in $(ls /usr/local/etc/bash_completion.d/); do 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 fi
done done
unset i unset i
{{- end }} {{ end -}}
{{ if lookPath "brew" -}} {{ if lookPath "brew" -}}
# vi: ft=bash if [ -f "$(brew --prefix)/share/bash-completion/bash_completion" ]; then
if command -v brew &> /dev/null; then
if [ -f "$(brew --prefix)/share/bash-completion/bash_completion" ]; then
. "$(brew --prefix)/share/bash-completion/bash_completion" . "$(brew --prefix)/share/bash-completion/bash_completion"
fi
fi fi
{{- end }} {{ end -}}
{{ if lookPath "direnv" -}} {{ if lookPath "direnv" -}}
eval "$(direnv hook bash)" eval "$(direnv hook bash)"
{{- end }} {{ end -}}
{{ if lookPath "erd" -}} {{ if lookPath "erd" -}}
eval "$(erd --completions bash)" eval "$(erd --completions bash)"
{{- end }} {{ end -}}
{{ if lookPath "helm" -}} {{ if lookPath "helm" -}}
source <(helm completion bash) source <(helm completion bash)
{{- end }} {{ end -}}
{{ if lookPath "kubectl" -}} {{ if lookPath "kubectl" -}}
source <(kubectl completion bash) source <(kubectl completion bash)
{{- end }} {{ end -}}
{{ if lookPath "starship" -}} {{ if lookPath "starship" -}}
source <(starship init bash) source <(starship init bash)
{{- end }} {{ end -}}
{{ if lookPath "trubka" -}}
eval "$(trubka --completion-script-bash)"
{{ end -}}
# vim: filetype=bash # vim: filetype=bash

@ -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 }}
Loading…
Cancel
Save