mirror of
https://github.com/pyenv/pyenv.git
synced 2025-11-16 07:13:53 -05:00
Define lightweight rbenv shell function to dispatch commands
This commit is contained in:
@@ -66,3 +66,18 @@ bash | zsh )
|
||||
esac
|
||||
|
||||
echo 'rbenv rehash 2>/dev/null'
|
||||
|
||||
commands=(`rbenv commands --sh`)
|
||||
IFS="|"
|
||||
cat <<EOS
|
||||
function rbenv () {
|
||||
command=\$1;
|
||||
shift;
|
||||
case \$command in
|
||||
${commands[*]})
|
||||
eval \`rbenv sh-\$command \$@\`;;
|
||||
*)
|
||||
command rbenv \$command \$@;;
|
||||
esac;
|
||||
};
|
||||
EOS
|
||||
|
||||
Reference in New Issue
Block a user