1#!/usr/bin/env bash 2set -e 3[ -n "$RBENV_DEBUG" ] && set -x 4 5# Provide rbenv completions 6if [ "$1" = "--complete" ]; then 7 exec rbenv-rehash --complete 8fi 9 10shell="$(basename "${RBENV_SHELL:-$SHELL}")" 11 12# When rbenv shell integration is enabled, delegate to rbenv-rehash, 13# then tell the shell to empty its command lookup cache. 14rbenv-rehash 15 16case "$shell" in 17fish ) 18 # no rehash support 19 ;; 20* ) 21 echo "hash -r 2>/dev/null || true" 22 ;; 23esac 24