(zsh) Add configuration for kubectl management

This commit is contained in:
Tanguy Herbron 2022-09-08 08:47:13 +02:00
parent 0c6bfe0bb7
commit ea95d48b7e

7
.zshrc
View File

@ -23,6 +23,8 @@ plugins=(git)
source $ZSH/oh-my-zsh.sh source $ZSH/oh-my-zsh.sh
source <(kubectl completion zsh)
# User configuration # User configuration
# You may need to manually set your language environment # You may need to manually set your language environment
@ -100,6 +102,11 @@ alias gitcommiiiiiiiiiiiiiit='cz'
alias clip='xclip -selection primary' alias clip='xclip -selection primary'
function kube-merge() {
cp ~/.kube/config ~/.kube/config.bak &&
KUBECONFIG=~/.kube/config-nuuday:~/.kube/config-halia kubectl config view --flatten > ~/.kube/config
}
# alias wg-reload="f() {sudo bash -c 'cd /etc/wireguard && wg syncconf $1 <(wg-quick strip $1)'};f" # alias wg-reload="f() {sudo bash -c 'cd /etc/wireguard && wg syncconf $1 <(wg-quick strip $1)'};f"
function wg-reload() { function wg-reload() {
sudo bash -c 'cd /etc/wireguard && wg syncconf $0 <(wg-quick strip $0)' $1 sudo bash -c 'cd /etc/wireguard && wg syncconf $0 <(wg-quick strip $0)' $1