Last active
December 1, 2025 10:10
-
-
Save Richard87/835414adb69346bf68214ff73948e98a to your computer and use it in GitHub Desktop.
zshrc config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export ZSH="$HOME/.oh-my-zsh" | |
| if service docker status 2>&1 | grep -q "is not running"; then | |
| wsl.exe -d "${WSL_DISTRO_NAME}" -u root -e /usr/sbin/service docker start >/dev/null 2>&1 | |
| fi | |
| unsetopt pathdirs | |
| ZSH_THEME="robbyrussell" | |
| COMPLETION_WAITING_DOTS="true" | |
| __kube_ps1() | |
| { | |
| yq '.current-context as $cur | .contexts[] | select(.name == $cur) | [$cur, .context.namespace] | join(":")' $HOME/.kube/config | |
| } | |
| function ns() { | |
| if [[ -n $1 ]] | |
| then | |
| kubectl config set-context --current --namespace=$1 | |
| kubectl config view --minify | grep namespace: | |
| else | |
| kubectl get ns | |
| fi | |
| } | |
| plugins=( | |
| git | |
| ssh-agent | |
| kubectl | |
| azure | |
| helm | |
| terraform | |
| ) | |
| zstyle :omz:plugins:ssh-agent identities id_rsa id_ed25519 ~/.gitsign/git_ssh_signing_key_1 | |
| source $ZSH/oh-my-zsh.sh | |
| PROMPT="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ ) %{$fg[cyan]%}%3~%{$reset_color%}" | |
| PROMPT+=' %{$fg_bold[green]%}k:$(__kube_ps1)%{$reset_color%} $(git_prompt_info)' | |
| export PATH="$PATH:/opt/nvim-linux-x86_64/bin" | |
| export PATH="$PATH:/usr/local/go/bin:$HOME/.dotnet:$HOME/go/bin:/opt/mssql-tools18/bin:$HOME/.krew/bin:$HOME/.bin" | |
| export BROWSER="powershell.exe /C start" | |
| export KUBE_EDITOR="code -w" | |
| export GIT_EDITOR=vim | |
| export DOTNET_ROOT=/usr/share/dotnet | |
| export BROWSER=~/.win-open.sh | |
| export NVM_DIR="$HOME/.nvm" | |
| [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm | |
| [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion | |
| alias k="kubectl" | |
| alias scale-canary-up='flux resume kustomization radix-cicd-canary && k scale deploy -n radix-cicd-canary --all --replicas=1' | |
| alias scale-canary-down='flux suspend kustomization radix-cicd-canary && k delete scaledobject cron-scaledobject -n radix-cicd-canary && k scale deploy -n radix-cicd-canary --all --replicas=0' | |
| alias reload-tokens='kubelogin remove-cache-dir && az logout && az login --only-show-errors --query name && kubelogin convert-kubeconfig -l azurecli' | |
| source <(flux completion zsh) | |
| source <(rx completion zsh) | |
| source <(kind completion zsh) | |
| source <(trivy completion zsh) | |
| . "$HOME/.local/bin/env" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment