Skip to content

Instantly share code, notes, and snippets.

@chrisgoffinet
Created December 21, 2020 09:12
Show Gist options
  • Save chrisgoffinet/f37820f359b6074b666f47ad90768b4e to your computer and use it in GitHub Desktop.
Save chrisgoffinet/f37820f359b6074b666f47ad90768b4e to your computer and use it in GitHub Desktop.
bash profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
export EDITOR="code --wait"
function parse_git_branch {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
GREEN="\[\033[1;32m\]"
YELLOW="\[\033[1;33m\]"
WHITE="\[\033[0;0m\]"
export CLICOLOR=1
export LSCOLORS=ExFxCxDxBxegedabagacad
export PATH=/usr/local/bin:/usr/local/opt/curl/bin:$PATH:$HOME/bin:/Applications/Visual\ Studio\ Code.app/Contents/Resources/app/bin
export PATH="${PATH}:${HOME}/.krew/bin"
# aliases
alias e=code
alias g=git
# kube aliases
alias k=kubectl
alias ksys='kubectl --namespace=kube-system'
alias ka='kubectl apply --recursive -f'
alias ksysa='kubectl --namespace=kube-system apply --recursive -f'
alias kak='kubectl apply -k'
alias kk='kubectl kustomize'
alias kex='kubectl exec -i -t'
alias ksysex='kubectl --namespace=kube-system exec -i -t'
alias klo='kubectl logs -f'
alias ksyslo='kubectl --namespace=kube-system logs -f'
alias klop='kubectl logs -f -p'
alias ksyslop='kubectl --namespace=kube-system logs -f -p'
alias kp='kubectl proxy'
alias kpf='kubectl port-forward'
alias kg='kubectl get'
alias kctx=kubectx
alias kns=kubens
bind '"\C-r": "\C-ahstr -- \C-j"'
export HISTFILESIZE=1000000
export HISTSIZE=${HISTFILESIZE}
export HSTR_CONFIG=hicolor,raw-history-view
shopt -s histappend
export PROMPT_COMMAND="history -a; history -n; ${PROMPT_COMMAND}"
export KUBECONFIG=$HOME/.kube/config
export BASH_SILENCE_DEPRECATION_WARNING=1
# kube-ps1
source "/usr/local/opt/kube-ps1/share/kube-ps1.sh"
KUBE_PS1_SYMBOL_ENABLE=false
PS1="[$GREEN\W$YELLOW\$(parse_git_branch)$WHITE] \$(kube_ps1)\$ "
export PATH="/usr/local/opt/helm@2/bin:$PATH"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment