I copied over the improved shell detection from rbenv-init. plenv-init wasn't picking up my zsh shell correctly as it was simply reading from the $SHELL variable.
There are additional changes to rbenv-init mostly around fish shell and completion commands, but I left those out for now.
Improve shell detection.
* This code change copied over from rbenv-init