Created
September 24, 2020 16:32
-
-
Save danielhusar/6040639b860df9733f963e5d74ad4eab to your computer and use it in GitHub Desktop.
This file contains 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
# Path to your oh-my-zsh configuration. | |
ZSH=$HOME/.oh-my-zsh | |
ZSH_THEME="prose" | |
DISABLE_CORRECTION="true" | |
COMPLETION_WAITING_DOTS="true" | |
plugins=(brew git git-extras github node npm rails) | |
source $ZSH/oh-my-zsh.sh | |
unsetopt correct | |
# PATH | |
export PATH=/sbin:$PATH | |
export PATH=/usr/sbin:$PATH | |
export PATH=/usr/bin:$PATH | |
export PATH=/bin:$PATH | |
export PATH=$(brew --prefix coreutils)/libexec/gnubin:$PATH | |
export PATH=/usr/local/bin:$PATH | |
export PATH=~/.rbenv/bin:$PATH | |
export PATH=~/.rbenv/shims:$PATH | |
export PATH=$HOME/.pilot/bin:$PATH | |
export PATH=$HOME/bin:$PATH | |
export PATH="$HOME/.yarn/bin:$PATH" | |
# export ANDROID_HOME=$HOME/Library/Android/sdk | |
# export PATH=$PATH:$ANDROID_HOME/tools | |
# export PATH=$PATH:$ANDROID_HOME/platform-tools | |
for file in ~/.{extra,exports,aliases,functions,env}; do | |
[ -r "$file" ] && source "$file" | |
done | |
unset file | |
# Prefer US English and use UTF-8 | |
export LC_ALL="en_US.UTF-8" | |
export LANG="en_US" | |
# Add nvm | |
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 | |
# Custom scripts | |
. ~/.scripts/z.sh | |
. ~/.scripts/k.sh | |
# Auto change node version | |
autoload -U add-zsh-hook | |
load-nvmrc() { | |
local node_version="$(nvm version)" | |
local nvmrc_path="$(nvm_find_nvmrc)" | |
if [ -n "$nvmrc_path" ]; then | |
local nvmrc_node_version=$(nvm version "$(cat "${nvmrc_path}")") | |
if [ "$nvmrc_node_version" = "N/A" ]; then | |
nvm install | |
elif [ "$nvmrc_node_version" != "$node_version" ]; then | |
nvm use | |
fi | |
elif [ "$node_version" != "$(nvm version default)" ]; then | |
echo "Reverting to nvm default version" | |
nvm use default | |
fi | |
} | |
export GPG_TTY=$(tty) | |
eval "$(rbenv init -)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment