Add support for RBENV_PLUGIN_PATH environment variable

This commit is contained in:
Sam Stephenson 2011-09-21 13:00:23 -05:00
parent 0c7c62dc04
commit 096743acde
2 changed files with 8 additions and 5 deletions

View file

@ -27,6 +27,9 @@ else
fi fi
export RBENV_ROOT export RBENV_ROOT
export RBENV_PLUGIN_PATH="${RBENV_PLUGIN_PATH}:/etc/rbenv.d:${RBENV_ROOT}/rbenv.d"
libexec_path="$(abs_dirname "$0")" libexec_path="$(abs_dirname "$0")"
export PATH="${libexec_path}:${PATH}" export PATH="${libexec_path}:${PATH}"

View file

@ -17,9 +17,9 @@ if [ -z "$RBENV_COMMAND" ]; then
fi fi
shopt -s nullglob shopt -s nullglob
SCRIPTS=(/etc/rbenv.d/"$RBENV_COMMAND"/*.bash ${RBENV_ROOT}/rbenv.d/"$RBENV_COMMAND"/*.bash) for path in ${RBENV_PLUGIN_PATH//:/$'\n'}; do
shopt -u nullglob for script in $path/"$RBENV_COMMAND"/*.bash; do
echo $script
for script in ${SCRIPTS[@]}; do done
echo $script
done done
shopt -u nullglob