dotfiles/zshrc

46 lines
1.4 KiB
Bash
Raw Normal View History

2017-08-16 13:50:12 +00:00
if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then
source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh"
fi
2016-02-19 02:55:51 +00:00
2017-08-16 13:50:12 +00:00
source ~/.zshrc.local
2016-02-19 20:46:43 +00:00
2019-02-25 19:42:07 +00:00
# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
export EDITOR="vim"
eval "$(direnv hook zsh)"
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
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
}
add-zsh-hook chpwd load-nvmrc
load-nvmrc
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
eval "$(pyenv init -)"
export PATH="$HOME/.rvm/bin:$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
# The next line updates PATH for the Google Cloud SDK.
if [ -f '/Users/tyrel/Downloads/google-cloud-sdk/path.zsh.inc' ]; then . '/Users/tyrel/Downloads/google-cloud-sdk/path.zsh.inc'; fi
# The next line enables shell command completion for gcloud.
if [ -f '/Users/tyrel/Downloads/google-cloud-sdk/completion.zsh.inc' ]; then . '/Users/tyrel/Downloads/google-cloud-sdk/completion.zsh.inc'; fi