From e6556d52c29bc350b20bea5480726eb98c460639 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 23 Apr 2020 16:10:48 +0100 Subject: [PATCH] [Minor] Lua_selectors: Add optional shadow result name --- lualib/lua_selectors/extractors.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lualib/lua_selectors/extractors.lua b/lualib/lua_selectors/extractors.lua index c01a07f4b..c40b93b3b 100644 --- a/lualib/lua_selectors/extractors.lua +++ b/lualib/lua_selectors/extractors.lua @@ -418,16 +418,18 @@ The first argument must be header name.]], -- Get specific symbol ['symbol'] = { ['get_value'] = function(task, args) - local symbol = task:get_symbol(args[1]) + local symbol = task:get_symbol(args[1], args[2]) if symbol then return symbol[1],'table' end end, ['description'] = 'Get specific symbol. The first argument must be the symbol name. ' .. + 'The second argument is an optional shadow result name. ' .. 'Returns the symbol table. See task:get_symbol()', - ['args_schema'] = {ts.string} + ['args_schema'] = {ts.string, ts.string:is_optional()} }, + } return extractors -- 2.39.5