-#if [[ $EUID != 0 && -e ~/.pyenv/bin ]]; then
-# export PATH="~/.pyenv/bin:$PATH"
-# eval "$(pyenv init -)"
-# eval "$(pyenv virtualenv-init -)"
-#fi
-
-# id prefer to have system-wide, plus user ruby, due to bug in it
-# https://github.com/rubygems/rubygems/pull/1002
-# further problems: installing multi-user ruby and user ruby,
-# you dont get multi-user ruby when you sudo to root, unless its sudo -i.
-# There a third hybrid form, which passenger error suggested I use,
-# but it didnt actually work.
-
-# in cased I never need this
-# rvm for non-interactive shell: modified from https://rvm.io/rvm/basics
-#if [[ $(type -t rvm) == file && ! $(type -t ruby) ]]; then
-# source $(rvm 1.9.3 do rvm env --path)
-#fi
-
-# based on warning from rvmsudo
-export rvmsudo_secure_path=1
-
-if [[ -s "/usr/local/rvm/scripts/rvm" ]]; then
- source "/usr/local/rvm/scripts/rvm"
-elif [[ -s $HOME/.rvm/scripts/rvm ]]; then
- source $HOME/.rvm/scripts/rvm
-fi
+
+mypyenvinit () {
+ if [[ $EUID == 0 || ! -e ~/.pyenv/bin ]]; then
+ echo "error: dont be root. make sure pyenv is installed"
+ return 1
+ fi
+ export PATH="~/.pyenv/bin:$PATH"
+ eval "$(pyenv init -)"
+ eval "$(pyenv virtualenv-init -)"
+}
+