From 9694fb74ef1eee548fd630a54d6ebe5044c25c49 Mon Sep 17 00:00:00 2001 From: delphinus Date: Sat, 7 Jan 2017 17:40:49 +0900 Subject: [PATCH] Detect Perl version in perlbrew with easier way https://github.com/sorin-ionescu/prezto/pull/1130#issuecomment-236634157 --- modules/perl/functions/perl-info | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/perl/functions/perl-info b/modules/perl/functions/perl-info index c26e405b..2c396ea5 100644 --- a/modules/perl/functions/perl-info +++ b/modules/perl/functions/perl-info @@ -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