From 31566d68cb3365ead1cdc8648c81d62ce966cb6f Mon Sep 17 00:00:00 2001 From: dvs1 Date: Fri, 25 Oct 2024 09:38:35 +1000 Subject: Just discovered the arg variable, use it and rename parseArgs() to just parse(). --- test_.lua | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'test_.lua') diff --git a/test_.lua b/test_.lua index e4448d2..d29a433 100755 --- a/test_.lua +++ b/test_.lua @@ -55,8 +55,7 @@ local options = ['--help'] = {help}, } -local args = {...} -_.parseArgs(options, args) +_.parse(arg, options) @@ -137,7 +136,12 @@ print(__'command NoSuchCommand':log():show():Do().status) --__'qpdfview':forkOnce() --__'qpdfview':forkOnce() +print('') + +for i,a in ipairs(arg) do print('arg[' .. i .. '] = ' .. a) end +print('') +for k,a in pairs(arg) do print('arg[' .. k .. '] = ' .. a) end __'date':log():show():Do() __'date; sleep 5; date':log():show():Do() -print('') + -- cgit v1.1