Speed up obtaining exec/which/whence completions

Delegate to `rbenv-shims` instead of `rbenv shims` and therefore skip
going through the main `rbenv` executable again that would set up a lot
of the environment that was already set.
This commit is contained in:
Mislav Marohnić 2014-10-15 01:24:45 +02:00
parent c69d9a1128
commit e851250da6
3 changed files with 3 additions and 3 deletions

View file

@ -18,7 +18,7 @@ set -e
# Provide rbenv completions
if [ "$1" = "--complete" ]; then
exec rbenv shims --short
exec rbenv-shims --short
fi
RBENV_VERSION="$(rbenv-version-name)"

View file

@ -8,7 +8,7 @@ set -e
# Provide rbenv completions
if [ "$1" = "--complete" ]; then
echo --path
exec rbenv shims --short
exec rbenv-shims --short
fi
if [ "$1" = "--path" ]; then

View file

@ -12,7 +12,7 @@ set -e
# Provide rbenv completions
if [ "$1" = "--complete" ]; then
exec rbenv shims --short
exec rbenv-shims --short
fi
remove_from_path() {