mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-21 20:47:00 -05:00
Define lightweight rbenv shell function to dispatch commands
This commit is contained in:
parent
5a4bee6eb5
commit
f9225d9cb4
1 changed files with 15 additions and 0 deletions
|
@ -66,3 +66,18 @@ bash | zsh )
|
||||||
esac
|
esac
|
||||||
|
|
||||||
echo 'rbenv rehash 2>/dev/null'
|
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
|
||||||
|
|
Loading…
Reference in a new issue