Detect Perl version in perlbrew with easier way

https://github.com/sorin-ionescu/prezto/pull/1130#issuecomment-236634157
This commit is contained in:
delphinus 2017-01-07 17:40:49 +09:00
parent 53da2fcfe9
commit 9694fb74ef

View file

@ -15,7 +15,7 @@ unset perl_info
typeset -gA perl_info
if (( $+commands[perlbrew] )); then
version=${${(F)${(f)"$(perlbrew list)"}:# *}[(w)2]}
version="${PERLBREW_PERL##*perl-}"
elif (( $+commands[plenv] )); then
version=$(plenv version-name)
elif (( $+commands[perl] )); then