Automatically add ${RBENV_ROOT}/plugins/*/bin to $PATH

This commit is contained in:
Sam Stephenson 2011-09-23 10:44:00 -05:00
parent f9fb3c934e
commit 8ce5e84c21

View file

@ -30,8 +30,16 @@ export RBENV_ROOT
export RBENV_HOOK_PATH="${RBENV_HOOK_PATH}:${RBENV_ROOT}/rbenv.d:/usr/local/etc/rbenv.d:/etc/rbenv.d"
libexec_path="$(abs_dirname "$0")"
export PATH="${libexec_path}:${PATH}"
shopt -s nullglob
rbenv_path="$(abs_dirname "$0")"
for plugin_bin in "${RBENV_ROOT}/plugins/"*/bin; do
rbenv_path="${rbenv_path}:${plugin_bin}"
done
shopt -u nullglob
export PATH="${rbenv_path}:${PATH}"
command="$1"
case "$command" in