diff options
author | 2022-01-26 11:03:46 +0100 | |
---|---|---|
committer | 2022-02-03 09:36:50 +0100 | |
commit | a3e19f88a6734e75d245147eee9647f621fed420 (patch) | |
tree | 95c4f9714e7cc677eb2f7099282438bd3ba4b2a6 | |
parent | gentoo-common: Simplify adding other impls (diff) | |
download | gentoo-syntax-a3e19f88a6734e75d245147eee9647f621fed420.tar.gz gentoo-syntax-a3e19f88a6734e75d245147eee9647f621fed420.tar.bz2 gentoo-syntax-a3e19f88a6734e75d245147eee9647f621fed420.zip |
gentoo-common: Use eval() more consistentlygentoo-syntax-20220203
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Closes: https://github.com/gentoo/gentoo-syntax/pull/39
-rw-r--r-- | plugin/gentoo-common.vim | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/plugin/gentoo-common.vim b/plugin/gentoo-common.vim index 671a3c5..5c704ab 100644 --- a/plugin/gentoo-common.vim +++ b/plugin/gentoo-common.vim @@ -78,11 +78,11 @@ fun! GentooGetPythonTargets() endif endfor if len(l:py3s) ==# 1 - let l:impls = l:impls->add("python3_".l:py3s->join()) + eval l:impls->add("python3_".l:py3s->join()) elseif len(l:py3s) > 1 let l:min = "" let l:max = "" - let l:py3s = l:py3s->sort('N') + eval l:py3s->sort('N') for l:py in l:py3s if l:min ==# "" let l:min = l:py @@ -96,11 +96,9 @@ fun! GentooGetPythonTargets() endfor if l:max !=# "" - let l:impls = l:impls->add("python3_{".l:min.".." - \ .l:max."}") + eval l:impls->add("python3_{".l:min."..".l:max."}") else - let l:impls = l:impls->add("python3_{".l:py3s - \ ->join(",")."}") + eval l:impls->add("python3_{".l:py3s->join(",")."}") endif endif let l:py3 = flatten(l:impls)->join() |