Compare commits

..

5 Commits

Author SHA1 Message Date
Xavier Logerais
c9411bb43d feat: Ajout de krew dans $PATH si nécéssaire 2024-06-18 12:45:37 +00:00
Xavier Logerais
c9bb673a15 feat: Ajout completion pour mise 2024-06-18 12:44:05 +00:00
Xavier Logerais
ee3626059c feat: Déplacement initialisation mise de rc.d vers profile.d 2024-06-18 12:43:23 +00:00
Xavier Logerais
9fddab2e35 feat: Déplacement initialisation asdf de rc.d vers profile.d 2024-06-18 12:42:52 +00:00
Xavier Logerais
2fa4a55223 feat: Ajout d'aliases pour kubectl 2024-06-18 12:30:05 +00:00
6 changed files with 31 additions and 20 deletions

View File

@ -1,14 +1,16 @@
#!/bin/bash #!/bin/bash
if (command -v kubectl &> /dev/null) if (command -v kubectl &>/dev/null); then
then
# create a quick alias # create some usefull aliases
alias k=kubectl alias k="kubectl"
alias ks="kubectl --namespace kube-system" alias kg="kubectl get"
alias kd="kubectl describe"
alias ks="kubectl --namespace kube-system"
alias kga="kubectl get --all-namespaces"
# add completion for the alias as well # add completion for the alias as well
complete -o default -F __start_kubectl k complete -o default -F __start_kubectl k
complete -o default -F __start_kubectl ks complete -o default -F __start_kubectl ks
fi fi

5
completion.d/mise Normal file
View File

@ -0,0 +1,5 @@
#!/bin/bash
if (command -v mise &>/dev/null); then
source <(mise completion bash)
fi

11
profile.d/asdf Normal file
View File

@ -0,0 +1,11 @@
#!/bin/bash
if [ -f ~/.asdf/asdf.sh ]; then
# activate asdf
source ~/.asdf/asdf.sh
# activate completion
source ~/.asdf/completions/asdf.bash
fi

5
profile.d/krew Normal file
View File

@ -0,0 +1,5 @@
#!/bin/bash
if (command -v krew &>/dev/null); then
export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"
fi

View File

@ -1,12 +0,0 @@
#!/bin/bash
if [ -f ~/.asdf/asdf.sh ]
then
# activate asdf
source ~/.asdf/asdf.sh
# activate completion
source ~/.asdf/completions/asdf.bash
fi