Comparison

clix.lua @ 28:c2998f70dfd4

clix: Pass short_help option to modules correctly
author Matthew Wild <mwild1@gmail.com>
date Tue, 12 Jan 2010 02:17:58 +0000
parent 23:c5f04bdc7c64
child 32:cda6a004ff79
comparison
equal deleted inserted replaced
27:5b58c002d6ad 28:c2998f70dfd4
17 if not command then 17 if not command then
18 print("Command Line XMPP, available commands:"); 18 print("Command Line XMPP, available commands:");
19 for module in pairs(package.preload) do 19 for module in pairs(package.preload) do
20 if module:match("^clix%.") then 20 if module:match("^clix%.") then
21 local m = require(module); 21 local m = require(module);
22 m{ "--short-help" }; 22 io.write("\t", module:gsub("^clix%.", ""), ": ");
23 m({ short_help = true }, {});
23 end 24 end
24 end 25 end
25 return 0; 26 return 0;
26 end 27 end
27 28