Fix `plenv()` function in ksh and dash.

dash doesn't support `typeset`.  Use `local` instead.

This commit is inspired by sstephenson/rbenv@5ae2cac088d12fea01054e1f3abbf304b92920b5 .
Merge pull request #56 from dochang/shell-fixes

Fix `plenv()` function in ksh and dash.
Fix plenv version command to output the currently correct version

Hopefully no-one forgets to update this when v2.1.2 is released!
bail out early if readlink is not available

readlink comes from GNU coreutils.  On systems without it, rbenv used to
spin out of control when it didn't have readlink or greadlink available
because it would re-exec the frontend script over and over instead of
the worker script in libexec.

Ref. #58
https://github.com/sstephenson/rbenv/commit/81bb14e181c556e599e20ca6fdc86fdb690b8995
https://github.com/sstephenson/rbenv/issues/389
add autocompletion file for fish shell
Merge pull request #59 from exzz/fish

add autocompletion file for fish shell
Merge pull request #57 from LoonyPandora/master

Fix plenv version command to output the currently correct version
Improve shell detection.

* This code change copied over from rbenv-init
Merge pull request #62 from finn/master

Improve shell detection.
Install EU::MM before install cpanm.
Workaround for https://github.com/miyagawa/cpanminus/issues/401.
Only rehash if required
Allow cpanm to be installed through proxy

Curl wasn't working correctly while under a proxy, was getting this error:
curl: (35) error:14077458:SSL routines:SSL23_GET_SERVER_HELLO:reason(1112)
Merge pull request #70 from dave-miles/fix/cpanm-shim

Only rehash cpanm if required
Merge pull request #69 from stephenap07/master

Allow cpanm to be installed through proxy