From b45bce80ca053648647c00a5a53bc4a718ba2941 Mon Sep 17 00:00:00 2001 From: Sam Stephenson Date: Tue, 16 Aug 2011 00:13:12 -0500 Subject: [PATCH] Source the zsh autocompletion script in rbenv-init --- completions/{_rbenv.zsh => rbenv.zsh} | 0 libexec/rbenv-init | 8 +++++--- 2 files changed, 5 insertions(+), 3 deletions(-) rename completions/{_rbenv.zsh => rbenv.zsh} (100%) diff --git a/completions/_rbenv.zsh b/completions/rbenv.zsh similarity index 100% rename from completions/_rbenv.zsh rename to completions/rbenv.zsh diff --git a/libexec/rbenv-init b/libexec/rbenv-init index 4dc751dd..392edf40 100755 --- a/libexec/rbenv-init +++ b/libexec/rbenv-init @@ -55,8 +55,10 @@ mkdir -p "${HOME}/.rbenv/"{shims,versions} echo 'export PATH="${HOME}/.rbenv/shims:${PATH}"' -if [ "$shell" = "bash" ]; then - echo "source \"$root/completions/rbenv.bash\"" -fi +case "$shell" in +bash | zsh ) + echo "source \"$root/completions/rbenv.${shell}\"" + ;; +esac echo 'rbenv rehash 2>/dev/null'