Last active
December 17, 2015 03:28
-
-
Save deiga/5543151 to your computer and use it in GitHub Desktop.
sed -e '/source.*scripts\/rvm/ d; /\. .*scripts\/rvm/ d;' .zprofile
This file contains hidden or 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
#[[ -r $rvm_path/scripts/completion ]] && . $rvm_path/scripts/completion | |
#echo 'zprofile' $0 # Debug | |
# Locale settings | |
export LANG="en_GB.UTF-8" | |
export LC_ALL="en_GB.UTF-8" | |
# Customize to your needs... | |
RVMS_PATH=$rvm_path:$rvm_bin_path # Add RVM to PATH for scripting | |
BIN_PATH=$HOME/bin # Add ~/bin to PATH | |
NPM_PATH=/usr/local/share/npm/bin # Add npm packages to PATH | |
BOX_PATH=$HOME/dotfiles/box/bin # Add path for box | |
PATH=$BIN_PATH:$NPM_PATH:$BOX_PATH:$PATH | |
case $OSTYPE in | |
darwin*) | |
COREUTILS_PATH=/usr/local/opt/coreutils/libexec/gnubin | |
HOMEBREW_PATH=/usr/local/sbin:/usr/local/bin:/usr/local/share/python | |
PATH=$COREUTILS_PATH:$HOMEBREW_PATH:$PATH | |
# export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH | |
;; | |
esac | |
typeset -U PATH | |
export PATH | |
# Make path system wide for OS X | |
case $OSTYPE in | |
darwin*) | |
launchctl setenv PATH $PATH | |
;; | |
esac | |
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function* |
This file contains hidden or 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
When opening new iTerm tab into a folder it loads the PATH in a wrong order so that system ruby is used. | |
Reloading the folder via `cd;cd -` fixes PATH problems | |
After opening: | |
echo $PATH | |
/Users/timosand/.nvm/v0.10.0/bin:./bundler_stubs:/usr/local/opt/coreutils/libexec/gnubin:/usr/local/sbin:/usr/local/bin:/usr/local/share/python:/Users/timosand/bin:/usr/local/share/npm/bin:/Users/timosand/dotfiles/box/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/texbin:./bin:/Users/timosand/.rvm/gems/ruby-2.0.0-p0@roydon/bin:/Users/timosand/.rvm/gems/ruby-2.0.0-p0@global/bin:/Users/timosand/.rvm/rubies/ruby-2.0.0-p0/bin:/Users/timosand/.rvm/bin | |
rvm current | |
ruby-2.0.0-p0@roydon | |
ruby --version | |
ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0] | |
After 'cd;cd -': | |
echo $PATH | |
./bundler_stubs:./bin:/Users/timosand/.rvm/gems/ruby-2.0.0-p0@roydon/bin:/Users/timosand/.rvm/gems/ruby-2.0.0-p0@global/bin:/Users/timosand/.rvm/rubies/ruby-2.0.0-p0/bin:/Users/timosand/.rvm/bin:/Users/timosand/.nvm/v0.10.0/bin:/usr/local/opt/coreutils/libexec/gnubin:/usr/local/sbin:/usr/local/bin:/usr/local/share/python:/Users/timosand/bin:/usr/local/share/npm/bin:/Users/timosand/dotfiles/box/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/texbin | |
rvm current | |
ruby-2.0.0-p0@roydon | |
ruby --version | |
ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-darwin12.2.0] |
This file contains hidden or 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
#[[ -r $rvm_path/scripts/completion ]] && . $rvm_path/scripts/completion | |
#echo 'zprofile' $0 # Debug | |
# Locale settings | |
export LANG="en_GB.UTF-8" | |
export LC_ALL="en_GB.UTF-8" | |
# Customize to your needs... | |
RVMS_PATH=$rvm_path:$rvm_bin_path # Add RVM to PATH for scripting | |
BIN_PATH=$HOME/bin # Add ~/bin to PATH | |
NPM_PATH=/usr/local/share/npm/bin # Add npm packages to PATH | |
BOX_PATH=$HOME/dotfiles/box/bin # Add path for box | |
PATH=$BIN_PATH:$NPM_PATH:$BOX_PATH:$PATH | |
case $OSTYPE in | |
darwin*) | |
COREUTILS_PATH=/usr/local/opt/coreutils/libexec/gnubin | |
HOMEBREW_PATH=/usr/local/sbin:/usr/local/bin:/usr/local/share/python | |
PATH=$COREUTILS_PATH:$HOMEBREW_PATH:$PATH | |
# export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH | |
;; | |
esac | |
typeset -U PATH | |
export PATH | |
# Make path system wide for OS X | |
case $OSTYPE in | |
darwin*) | |
launchctl setenv PATH $PATH | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment