Merge completions into a single file
parent
0250cbe9b0
commit
733832a592
@ -1,9 +0,0 @@
|
||||
{{ if lookPath "bat" -}}
|
||||
#!/usr/bin/env bash
|
||||
|
||||
alias batdiff='batdiff --pager=""'
|
||||
|
||||
if command -v bat &> /dev/null ; then
|
||||
alias cat=bat
|
||||
fi
|
||||
{{- end }}
|
@ -1,8 +0,0 @@
|
||||
{{ 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
|
||||
fi
|
||||
{{- end }}
|
@ -1,28 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# shellcheck disable=SC1091
|
||||
if [ -f /etc/bash_completion ]; then
|
||||
source /etc/bash_completion
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC1091
|
||||
if [ -f /usr/local/etc/bash_completion ]; then
|
||||
source /usr/local/etc/bash_completion
|
||||
fi
|
||||
|
||||
COMPLETION_DIR=/usr/local/etc/bash_completion.d/
|
||||
|
||||
if [ -d "$COMPLETION_DIR" ]; then
|
||||
# shellcheck disable=SC2045
|
||||
for i in $(ls "$COMPLETION_DIR"); do
|
||||
file="$COMPLETION_DIR/$i"
|
||||
if [ -r "${file}" ]; then
|
||||
# shellcheck disable=SC1090
|
||||
source "${file}"
|
||||
fi
|
||||
unset file
|
||||
done
|
||||
unset i
|
||||
fi
|
||||
|
||||
unset COMPLETION_DIR
|
@ -0,0 +1,52 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
{{ if stat "/etc/bash_completion" -}}
|
||||
# shellcheck disable=SC1091
|
||||
source /etc/bash_completion
|
||||
{{- end }}
|
||||
|
||||
{{ if stat "/usr/local/etc/bash_completion" -}}
|
||||
# shellcheck disable=SC1091
|
||||
source /usr/local/etc/bash_completion
|
||||
{{- end }}
|
||||
|
||||
{{ if stat "/usr/local/etc/bash_completion.d/" -}}
|
||||
for i in $(ls /usr/local/etc/bash_completion.d/); do
|
||||
if [ -r "/usr/local/etc/bash_completion.d/$i" ]; then
|
||||
# shellcheck disable=SC1090
|
||||
source "/usr/local/etc/bash_completion.d/$i"
|
||||
fi
|
||||
done
|
||||
unset i
|
||||
{{- 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
|
||||
fi
|
||||
{{- end }}
|
||||
|
||||
{{ if lookPath "direnv" -}}
|
||||
eval "$(direnv hook bash)"
|
||||
{{- end }}
|
||||
|
||||
{{ if lookPath "erd" -}}
|
||||
eval "$(erd --completions bash)"
|
||||
{{- end }}
|
||||
|
||||
{{ if lookPath "helm" -}}
|
||||
source <(helm completion bash)
|
||||
{{- end }}
|
||||
|
||||
{{ if lookPath "kubectl" -}}
|
||||
source <(kubectl completion bash)
|
||||
{{- end }}
|
||||
|
||||
{{ if lookPath "starship" -}}
|
||||
source <(starship init bash)
|
||||
{{- end }}
|
||||
|
||||
# vim: filetype=bash
|
@ -1,3 +0,0 @@
|
||||
{{ if lookPath "direnv" -}}
|
||||
eval "$(direnv hook bash)"
|
||||
{{- end }}
|
@ -1,3 +0,0 @@
|
||||
{{ if lookPath "erd" -}}
|
||||
eval "$(erd --completions bash)"
|
||||
{{- end }}
|
@ -1,6 +0,0 @@
|
||||
{{ if lookPath "kubectl" -}}
|
||||
# vi: ft=bash
|
||||
if command -v kubectl > /dev/null 2>&1; then
|
||||
source <(kubectl completion bash)
|
||||
fi
|
||||
{{- end }}
|
@ -1,4 +0,0 @@
|
||||
{{ if lookPath "starship" -}}
|
||||
# vim: ft=bash
|
||||
source <(starship init bash)
|
||||
{{- end }}
|
Loading…
Reference in New Issue