-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdot_bash_completion.tmpl
52 lines (44 loc) · 960 Bytes
/
dot_bash_completion.tmpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
command -v mise &> /dev/null && \
eval "$(mise activate bash)" && \
eval "$(mise completion bash)"
command -v aqua &> /dev/null && source <(aqua completion bash)
# terraform and etc.
while read cmd
do
if command -v $cmd &> /dev/null; then
complete -C $(command -v $cmd) $cmd
fi
done << EOF
terraform
terragrunt
tofu
EOF
# git
if [ -f ~/.git-completion.sh ]; then
source ~/.git-completion.sh
fi
if [ -f ~/.git-prompt.sh ]; then
source ~/.git-prompt.sh
fi
export PS1='[\[\033[32m\]\u\[\033[00m\]:\[\033[33m\]\w\[\033[00m\]]\[\033[36m\]$(__git_ps1 " (%s)")\[\033[00m\]\n\$ '
# gh
if command -v gh &> /dev/null; then
eval "$(gh completion -s bash)"
fi
# direnv
if command -v direnv &> /dev/null; then
eval "$(direnv hook bash)"
fi
while read cmd
do
if command -v $cmd &> /dev/null; then
eval "$($cmd completion bash)"
fi
done << EOF
kubectl
helm
helmfile
kustomize
devpod
EOF
{{ completion "bash" }}