RVM

configuration of sourcing, PATH and command-t Vim plugin for RVM.

sourcing

sourcing RVM:

[[ -s "~/.rvm/scripts/rvm" ]] && source "~/.rvm/scripts/rvm"

after installation RVM adds this source line automatically to many rc files.

but it’s required to source RVM only twice:

remove sourcing RVM from everywhere else.

NOTE: don’t source RVM in .zshenv because in that case RVM doesn’t switch to its default ruby in new Zsh session.

PATH

I modified PATH in 2 locations (IDK if it’s strictly necessary):

command-t

switch to system ruby when compiling command-t Vim plugin in ~.vim/update_bundles:

puts "compiling command-t..."

# https://langui.sh/2014/03/10/wunused-command-line-argument-hard-error-in-future-is-a-harsh-mistress
environment = 'ARCHFLAGS="-Wno-error=unused-command-line-argument-hard-error-in-future"'
command_t_path = File.join 'command-t', 'ruby', 'command-t'
rvm_init_script = 'source ~/.rvm/scripts/rvm'
command_t_build_script = 'rvm use system && ruby extconf.rb && make'

puts `zsh -c 'cd #{command_t_path} && #{rvm_init_script} && #{environment} #{command_t_build_script}'`