Last active
March 12, 2024 11:27
-
-
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" | |
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 | |
) | |
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:/usr/local/go/bin:$HOME/.dotnet:$HOME/go/bin:/opt/mssql-tools18/bin" | |
export BROWSER="powershell.exe /C start" | |
export KUBE_EDITOR="code -w" | |
export GIT_EDITOR=vim | |
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 ksys="kubectl --namespace=kube-system" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment