diff options
author | dvs1 | 2024-10-25 09:38:35 +1000 |
---|---|---|
committer | dvs1 | 2024-10-25 09:38:35 +1000 |
commit | 31566d68cb3365ead1cdc8648c81d62ce966cb6f (patch) | |
tree | bbe3d4bc790530c6e955e21b18d1150d6036f73a /test_.lua | |
parent | Yet another TODO, YATODO. (diff) | |
download | JackOnAllDevices-31566d68cb3365ead1cdc8648c81d62ce966cb6f.zip JackOnAllDevices-31566d68cb3365ead1cdc8648c81d62ce966cb6f.tar.gz JackOnAllDevices-31566d68cb3365ead1cdc8648c81d62ce966cb6f.tar.bz2 JackOnAllDevices-31566d68cb3365ead1cdc8648c81d62ce966cb6f.tar.xz |
Just discovered the arg variable, use it and rename parseArgs() to just parse().
Diffstat (limited to 'test_.lua')
-rwxr-xr-x | test_.lua | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -55,8 +55,7 @@ local options = | |||
55 | ['--help'] = {help}, | 55 | ['--help'] = {help}, |
56 | } | 56 | } |
57 | 57 | ||
58 | local args = {...} | 58 | _.parse(arg, options) |
59 | _.parseArgs(options, args) | ||
60 | 59 | ||
61 | 60 | ||
62 | 61 | ||
@@ -137,7 +136,12 @@ print(__'command NoSuchCommand':log():show():Do().status) | |||
137 | --__'qpdfview':forkOnce() | 136 | --__'qpdfview':forkOnce() |
138 | --__'qpdfview':forkOnce() | 137 | --__'qpdfview':forkOnce() |
139 | 138 | ||
139 | print('') | ||
140 | |||
141 | for i,a in ipairs(arg) do print('arg[' .. i .. '] = ' .. a) end | ||
142 | print('') | ||
143 | for k,a in pairs(arg) do print('arg[' .. k .. '] = ' .. a) end | ||
140 | 144 | ||
141 | __'date':log():show():Do() | 145 | __'date':log():show():Do() |
142 | __'date; sleep 5; date':log():show():Do() | 146 | __'date; sleep 5; date':log():show():Do() |
143 | print('') | 147 | |