From 789ace54ec8699d5042c7cd0dda244610b2a5e1c Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Wed, 21 Sep 2011 12:36:07 -0500 Subject: [PATCH] Add bin to list plugin scripts --- libexec/rbenv-plugin-scripts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 libexec/rbenv-plugin-scripts diff --git a/libexec/rbenv-plugin-scripts b/libexec/rbenv-plugin-scripts new file mode 100755 index 00000000..e77c8719 --- /dev/null +++ b/libexec/rbenv-plugin-scripts @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +set -e +[ -n "$RBENV_DEBUG" ] && set -x + +# Provide rbenv completions +if [ "$1" = "--complete" ]; then + echo exec + echo rehash + echo which + exit +fi + +shopt -s nullglob +RBENV_EXEC_PLUGINS=(/etc/rbenv.d/$1/*.bash ${RBENV_ROOT}/rbenv.d/$1/*.bash) +shopt -u nullglob + +for script in ${RBENV_EXEC_PLUGINS[@]}; do + echo $script +done