fix(command parser): evaluate valid lua expressions (#1128)

This commit is contained in:
Luke Kershaw
2021-08-19 20:49:16 +01:00
committed by GitHub
parent 615efe666b
commit d6d28dbe32

View File

@@ -104,7 +104,7 @@ local function convert_user_opts(user_opts)
user_opts[key] = nil user_opts[key] = nil
elseif select("#", assert(eval)()) == 1 and type(assert(eval)()) == "table" then elseif select("#", assert(eval)()) == 1 and type(assert(eval)()) == "table" then
-- allow if return a single table only -- allow if return a single table only
user_opts[key] = eval user_opts[key] = assert(eval)()
else else
-- otherwise return nil (allows split check later) -- otherwise return nil (allows split check later)
user_opts[key] = nil user_opts[key] = nil