From e851250da66307a2584218b555068c941b493d44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mislav=20Marohni=C4=87?= Date: Wed, 15 Oct 2014 01:24:45 +0200 Subject: [PATCH] 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. --- libexec/rbenv-exec | 2 +- libexec/rbenv-whence | 2 +- libexec/rbenv-which | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libexec/rbenv-exec b/libexec/rbenv-exec index a9309d0e..e05ce511 100755 --- a/libexec/rbenv-exec +++ b/libexec/rbenv-exec @@ -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)" diff --git a/libexec/rbenv-whence b/libexec/rbenv-whence index df1d6604..3d4c89b4 100755 --- a/libexec/rbenv-whence +++ b/libexec/rbenv-whence @@ -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 diff --git a/libexec/rbenv-which b/libexec/rbenv-which index f656537d..3cf91de7 100755 --- a/libexec/rbenv-which +++ b/libexec/rbenv-which @@ -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() {