Add support for ruby gem paths and rvm
Update convention to use -s over !-f
This commit is contained in:
14
zshenv
14
zshenv
@ -1,10 +1,20 @@
|
||||
export EDITOR="nvim"
|
||||
export GPG_TTY=$(tty)
|
||||
export NVM_DIR="$HOME/.nvm"
|
||||
|
||||
fpath+=(~/.zsh/completions)
|
||||
|
||||
# Setup cargo
|
||||
[[ ! -f ~/.cargo/env ]] || source ~/.cargo/env
|
||||
[[ -s ~/.cargo/env ]] && source ~/.cargo/env
|
||||
|
||||
# Source machine-specific environment
|
||||
[[ ! -f ~/.zshenv.local ]] || source ~/.zshenv.local
|
||||
[[ -s ~/.zshenv.local ]] && source ~/.zshenv.local
|
||||
|
||||
# Local gems
|
||||
if (( $+commands[ruby] )); then
|
||||
local gem_bin_path="$(ruby -r rubygems -e 'puts Gem.user_dir')/bin"
|
||||
[[ -d "$gem_bin_path" ]] && path+=("$gem_bin_path")
|
||||
fi
|
||||
|
||||
# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
|
||||
[[ -d "$HOME/.rvm/bin" ]] && path+=("$HOME/.rvm/bin")
|
||||
|
Reference in New Issue
Block a user