Skip to content

Instantly share code, notes, and snippets.

@pcnoic
Created March 12, 2024 12:30
Show Gist options
  • Save pcnoic/ea6549c8da20f757bf1bd13b07c90ac5 to your computer and use it in GitHub Desktop.
Save pcnoic/ea6549c8da20f757bf1bd13b07c90ac5 to your computer and use it in GitHub Desktop.
.zshrc config
DEFAULT_USER="$(whoami)"
export GOENV_ROOT="$HOME/.goenv"
export PATH="$GOENV_ROOT/bin:$PATH"
eval "$(goenv init -)"
export PATH="$GOROOT/bin:$PATH"
export PATH="$PATH:$GOPATH/bin"
# Aliases
alias gitpush='git push origin "$(git rev-parse --abbrev-ref HEAD)"'
alias gitpushforce='git push origin "$(git rev-parse --abbrev-ref HEAD)" --force-with-lease'
alias tf='terraform'
alias lg='lazygit'
alias python3='python'
export LDFLAGS="-L/opt/homebrew/opt/ruby/lib"
export CPPFLAGS="-I/opt/homebrew/opt/ruby/include"
# Default editor
export EDITOR="micro"
# Google Cloud Kubernetes Engine Plugin
export USE_GKE_GCLOUD_AUTH_PLUGIN=True
# Oh My Zsh installation path
export ZSH="$HOME/.oh-my-zsh"
# Zsh theme
ZSH_THEME="agnoster"
# Adding useful plugins
plugins=(git zsh-autosuggestions zsh-syntax-highlighting docker docker-compose)
# Source Oh My Zsh
source $ZSH/oh-my-zsh.sh
# Conda initialization
__conda_setup="$('/Users/christos.alexiou/opt/anaconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/Users/christos.alexiou/opt/anaconda3/etc/profile.d/conda.sh" ]; then
# . "/Users/christos.alexiou/opt/anaconda3/etc/profile.d/conda.sh" # commented out by conda initialize
else
export PATH="/Users/christos.alexiou/opt/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
# Homebrew environment
eval "$(/opt/homebrew/bin/brew shellenv)"
# Kubernetes completion
[[ $commands[kubectl] ]] && source <(kubectl completion zsh)
# Fuzzy Finder
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
# TheFuck command correction
eval $(thefuck --alias)
# Fig post block
[[ -f "$HOME/.fig/shell/zshrc.post.zsh" ]] && builtin source "$HOME/.fig/shell/zshrc.post.zsh"
# GVM (Go Version Manager)
[[ -s "/Users/christos.alexiou/.gvm/scripts/gvm" ]] && source "/Users/christos.alexiou/.gvm/scripts/gvm"
# CodeWhisperer post block. Keep at the bottom of this file.
[[ -f "${HOME}/Library/Application Support/codewhisperer/shell/zshrc.post.zsh" ]] && builtin source "${HOME}/Library/Application Support/codewhisperer/shell/zshrc.post.zsh"
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/Users/christos/miniconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/Users/christos/miniconda3/etc/profile.d/conda.sh" ]; then
. "/Users/christos/miniconda3/etc/profile.d/conda.sh"
else
export PATH="/Users/christos/miniconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
export PATH="/opt/homebrew/opt/ruby/bin:$PATH"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment