Skip to content

Commit

Permalink
Speed up obtaining exec/which/whence completions
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mislav committed Oct 14, 2014
1 parent c69d9a1 commit e851250
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion libexec/rbenv-exec
Expand Up @@ -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)"
Expand Down
2 changes: 1 addition & 1 deletion libexec/rbenv-whence
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion libexec/rbenv-which
Expand Up @@ -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() {
Expand Down

0 comments on commit e851250

Please sign in to comment.