Software / code / clix
Comparison
clix.lua @ 38:eb9f706324c7
clix.lua: Correctly remove handled args
| author | Florian Zeitz <florob@babelmonkeys.de> |
|---|---|
| date | Tue, 06 Jul 2010 17:02:40 +0200 |
| parent | 37:bb7a51aca282 |
| child | 40:c74380af7075 |
comparison
equal
deleted
inserted
replaced
| 37:bb7a51aca282 | 38:eb9f706324c7 |
|---|---|
| 128 break; | 128 break; |
| 129 end | 129 end |
| 130 end | 130 end |
| 131 | 131 |
| 132 -- Remove all the handled args from the arg array | 132 -- Remove all the handled args from the arg array |
| 133 for n=(args_handled_up_to or #arg),1,-1 do | 133 for n=((args_handled_up_to > 0) and args_handled_up_to or #arg),1,-1 do |
| 134 table.remove(arg, n); | 134 table.remove(arg, n); |
| 135 end | 135 end |
| 136 | 136 |
| 137 local ok, m = pcall(require, "clix."..command); | 137 local ok, m = pcall(require, "clix."..command); |
| 138 if not ok then | 138 if not ok then |