From a9837f3a066f6a2a7898ddb281a5ff34e1750df1 Mon Sep 17 00:00:00 2001 From: Jamis Buck Date: Wed, 3 Aug 2011 07:28:50 -0600 Subject: [PATCH] look for plugin scripts to extend functionality --- libexec/rbenv-exec | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libexec/rbenv-exec b/libexec/rbenv-exec index ffd911b9..5bd4e8c5 100755 --- a/libexec/rbenv-exec +++ b/libexec/rbenv-exec @@ -8,5 +8,13 @@ fi RBENV_COMMAND_PATH="$(rbenv-which "$RBENV_COMMAND")" +shopt -s nullglob +RBENV_EXEC_PLUGINS=(/etc/rbenv.d/exec/*.bash ${HOME}/.rbenv/rbenv.d/exec/*.bash) +shopt -u nullglob + +for script in $RBENV_EXEC_PLUGINS; do + source $script +done + shift 1 exec -a "$RBENV_COMMAND" "$RBENV_COMMAND_PATH" "$@"