Add trubka completion

main
Buddy Sandidge 2 years ago
parent 733832a592
commit c7efa4735c

@ -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

@ -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