diff options
Diffstat (limited to '')
-rw-r--r-- | ClientHamr/GuiLua/skang.lua | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/ClientHamr/GuiLua/skang.lua b/ClientHamr/GuiLua/skang.lua index 1fbe7cc..0f1285a 100644 --- a/ClientHamr/GuiLua/skang.lua +++ b/ClientHamr/GuiLua/skang.lua | |||
@@ -151,7 +151,7 @@ end | |||
151 | --[[ Parse command line parameters. | 151 | --[[ Parse command line parameters. |
152 | 152 | ||
153 | This is done in two parts. Skang will do an initial scan and tokenise, | 153 | This is done in two parts. Skang will do an initial scan and tokenise, |
154 | then each module gets a chance to pull it's own stuff from the result. | 154 | then each module gets a chance to pull it's own Things from the result. |
155 | 155 | ||
156 | Make the command line parameter getting MUCH more intelligent, try to support the common | 156 | Make the command line parameter getting MUCH more intelligent, try to support the common |
157 | command line interfaces - | 157 | command line interfaces - |
@@ -178,6 +178,16 @@ boolean, value beginning with T, t, F, f, etc is true, otherwise value is false, | |||
178 | next token starts with an introducer, then value is true. | 178 | next token starts with an introducer, then value is true. |
179 | 179 | ||
180 | TODO - Finish supporting all of the above. | 180 | TODO - Finish supporting all of the above. |
181 | -ab - Perhaps check for single character aliases, and if one matches, replace '-ab' with '-b'. | ||
182 | If a match is found, and there's letters left, DON'T mark it as used. | ||
183 | If it was the last one that was replaced, then check if there's a value after it. | ||
184 | These all need deeper parsing, but we dunno if they might have been inside quoted strings from the shell. | ||
185 | arg=value | ||
186 | arg = value | ||
187 | arg1=value1&arg2=value2 | ||
188 | arg1=value1|arg2=value2 | ||
189 | On the other hand, | ||
190 | --arg = value -> --arg value | ||
181 | ]] | 191 | ]] |
182 | 192 | ||
183 | ARGS = {} | 193 | ARGS = {} |
@@ -198,7 +208,7 @@ scanArguments = function (args) | |||
198 | if '=' == string.sub(v, 1, 1) then pre = '='; v = string.sub(v, 2, -1) end | 208 | if '=' == string.sub(v, 1, 1) then pre = '='; v = string.sub(v, 2, -1) end |
199 | if '&' == string.sub(v, 1, 1) then pre = '&'; v = string.sub(v, 2, -1) end | 209 | if '&' == string.sub(v, 1, 1) then pre = '&'; v = string.sub(v, 2, -1) end |
200 | if '|' == string.sub(v, 1, 1) then pre = '|'; v = string.sub(v, 2, -1) end | 210 | if '|' == string.sub(v, 1, 1) then pre = '|'; v = string.sub(v, 2, -1) end |
201 | ARGS[i] = {pre, v} | 211 | if '' ~= v then ARGS[i] = {pre, v} end |
202 | end | 212 | end |
203 | end | 213 | end |
204 | end | 214 | end |