sstephenson/rbenv — Issue #185: Better shell detection
Author: roolo
Created: 2012-01-31 10:21:35+00:00
State: open

### Description

In zsh still getting error about not found command

/Users/mailo/.rbenv/libexec/../completions/rbenv.bash:14: command not found: complete

### Explanation

In rbenv-init, there is shell detected by `$SHELL` variable. This variable contains user's DEFAULT shell, which doesn't have to equal to CURRENT shell.

Example from my terminal

➜ ~ echo $SHELL
/bin/bash
➜ ~ echo $0
/bin/zsh

### Possible way to fix

Detect shell from `$0` instead of `$SHELL`