#!/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 RBENV_COMMAND="$1" if [ -z "$RBENV_COMMAND" ]; then echo "usage: rbenv plugin-scripts COMMAND" >&2 exit 1 fi shopt -s nullglob SCRIPTS=(/etc/rbenv.d/"$RBENV_COMMAND"/*.bash ${RBENV_ROOT}/rbenv.d/"$RBENV_COMMAND"/*.bash) shopt -u nullglob for script in ${SCRIPTS[@]}; do echo $script done