File tree Expand file tree Collapse file tree 1 file changed +24
-5
lines changed Expand file tree Collapse file tree 1 file changed +24
-5
lines changed Original file line number Diff line number Diff line change 22cite about-plugin
33about-plugin ' load pyenv, if you are using it'
44
5- export PYENV_ROOT=" $HOME /.pyenv"
6- pathmunge " $PYENV_ROOT /bin"
5+ # https://github.com/pyenv/pyenv
76
8- if _command_exists pyenv; then
9- eval " $( pyenv init - bash) "
7+ # Load after basher
8+ # BASH_IT_LOAD_PRIORITY: 260
9+
10+ # Don't modify the environment if we can't find the tool:
11+ # - Check if in $PATH already
12+ # - Check if installed manually to $PYENV_ROOT
13+ # - Check if installed manually to $HOME
14+ _command_exists pyenv \
15+ || [[ -n " $PYENV_ROOT " && -x " $PYENV_ROOT /bin/pyenv" ]] \
16+ || [[ -x " $HOME /.pyenv/bin/pyenv" ]] \
17+ || return 0
18+
19+ # Set PYENV_ROOT, if not already set
20+ export PYENV_ROOT=" ${PYENV_ROOT:- $HOME / .pyenv} "
21+
22+ # Add PYENV_ROOT/bin to PATH, if that's where it's installed
23+ if ! _command_exists pyenv && [[ -x " $PYENV_ROOT /bin/pyenv" ]]; then
24+ pathmunge " $PYENV_ROOT /bin"
1025fi
1126
12- # Load pyenv virtualenv if the virtualenv plugin is installed.
27+ # Initialize pyenv
28+ pathmunge " $PYENV_ROOT /shims"
29+ eval " $( pyenv init - bash) "
30+
31+ # Load pyenv virtualenv if the virtualenv plugin is installed.
1332if pyenv virtualenv-init - & > /dev/null; then
1433 eval " $( pyenv virtualenv-init - bash) "
1534fi
You can’t perform that action at this time.
0 commit comments