Compare commits

..

10 Commits

Author SHA1 Message Date
Xavier Logerais
08916f80b6 feat(completion): Ajout du support de minikube 2025-01-17 09:07:56 +00:00
Xavier Logerais
9324547f92 feat(completion): Ajout du support de k3d 2025-01-17 09:07:23 +00:00
Xavier Logerais
1c34023066 feat(completion): Ajout du support de flux 2025-01-17 09:07:04 +00:00
Xavier Logerais
cd341b7d80 feat(rc): Amélioration de la gestion de anyenv 2025-01-17 09:05:56 +00:00
Xavier Logerais
af5d43fb36 feat(rc): Amélioration de la gestion de tmux 2025-01-17 09:05:09 +00:00
Xavier Logerais
ddd9509d74 feat(rc): Amélioration de la gestion de mcfly 2025-01-17 09:04:46 +00:00
Xavier Logerais
30597e31ed feat(profile): Amélioration de la gestion de keychain 2025-01-17 09:03:53 +00:00
Xavier Logerais
ebb0139dbe feat(profile): Amélioration de la gestions des applications par défaut 2025-01-17 09:03:19 +00:00
Xavier Logerais
3759b1b0ac feat: Amélioration des aliases pour kubectl 2025-01-17 08:59:20 +00:00
Xavier Logerais
5f0ab15c42 feat: Ajout d'un alias automatique pour bat (improved cat) 2025-01-17 08:55:27 +00:00
10 changed files with 54 additions and 27 deletions

5
aliases.d/bat Normal file
View File

@ -0,0 +1,5 @@
#!/bin/bash
if (command -v bat &>/dev/null); then
alias cat=bat
fi

View File

@ -6,10 +6,16 @@ if (command -v kubectl &>/dev/null); then
alias k="kubectl"
alias kg="kubectl get"
alias kd="kubectl describe"
alias ks="kubectl --namespace kube-system"
alias ksg="kubectl --namespace kube-system get"
alias ksd="kubectl --namespace kube-system describe"
alias kga="kubectl get --all-namespaces"
alias kuc="kubectl config unset current-context"
alias kun="kubectl config set-context --current --namespace="
alias kgworkers="kubectl get nodes --selector '!node-role.kubernetes.io/control-plane' --label-columns heat,topology.kubernetes.io/zone,topology.kubernetes.io/region --sort-by metadata.labels.heat"
alias kgnodes="kubectl get nodes --label-columns topology.kubernetes.io/region,topology.kubernetes.io/zone"
alias kgmasters="kubectl get nodes --selector 'node-role.kubernetes.io/control-plane' --label-columns topology.kubernetes.io/region,topology.kubernetes.io/zone"
alias kgworkers="kubectl get nodes --selector '!node-role.kubernetes.io/control-plane' --label-columns topology.kubernetes.io/region,topology.kubernetes.io/zone"
alias kgtaints="kubectl get nodes --output custom-columns=NAME:.metadata.name,TAINTS:.spec.taints"
fi

6
completion.d/flux Normal file
View File

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

5
completion.d/k3d Normal file
View File

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

5
completion.d/minikube Normal file
View File

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

View File

@ -8,7 +8,9 @@ if (command -v nvim &>/dev/null); then
fi
# PAGER
export PAGER=less
if (command -v less &>/dev/null); then
export PAGER=less
fi
# MANPAGER
if (command -v nvim &>/dev/null); then
@ -18,7 +20,11 @@ elif (command -v bat &>/dev/null); then
fi
# TERMINAL
export TERMINAL=kitty
if (command -v kitty &>/dev/null); then
export TERMINAL=kitty
fi
# BROWSER
export BROWSER=firefox
if (command -v firefox &>/dev/null); then
export BROWSER=firefox
fi

View File

@ -1,6 +1,5 @@
#!/bin/bash
if $(which keychain &> /dev/null)
then
eval $(keychain --agents ssh,gpg --eval)
if (command -v keychain &>/dev/null); then
eval "$(keychain --eval --noask ~/.ssh/{id_ed25519,id_rsa_native})"
fi

View File

@ -4,7 +4,6 @@
# git clone https://github.com/riywo/anyenv $HOME/.anyenv
if ( which anyenv &> /dev/null )
then
if (which anyenv &>/dev/null); then
eval "$(anyenv init -)"
fi

View File

@ -1,7 +1,7 @@
#!/bin/bash
if (which mcfly &>/dev/null); then
export MCFLY_PROMPT=""
if (command -v mcfly &>/dev/null); then
export MCFLY_PROMPT=" "
export MCFLY_INTERFACE_VIEW=BOTTOM
export MCFLY_RESULTS=50
export MCFLY_RESULTS_SORT=LAST_RUN

View File

@ -1,17 +1,14 @@
#!/bin/bash
# GNU Screen stuff
if ( which tmux &> /dev/null )
then
if [ $(pgrep -u "$UID" "tmux" | wc -l) -gt 0 ]
then
if [[ $TERM != screen* ]]
then
if (command -v tmux &>/dev/null); then
if [ "$(pgrep -u "$UID" "tmux" | wc -l)" -gt 0 ]; then
if [[ $TERM != screen* ]]; then
nb_sessions=$(tmux list-session | wc -l)
nb_sessions_attached=$(tmux list-session | grep "attached" | wc -l)
nb_sessions_detached=$(tmux list-session | grep -v "attached" | wc -l)
nb_sessions_attached=$(tmux list-session | grep -c "attached")
nb_sessions_detached=$(tmux list-session | grep -c -v "attached")
echo_reverse "Found ${nb_sessions} tmux session(s)"
echo_info "Found ${nb_sessions} tmux session(s)"
echo " * ${nb_sessions_attached} attached"
tmux list-sessions | grep "attached" | sed -e 's/^/ - /'
@ -22,4 +19,3 @@ then
fi
fi
fi