lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Metalua has a fairly complete options parser, accessible here:

It uses some metalua extensions, so if you want to use it without metalua you'll have to either use the bytecode-compiled version (which is lua compatible), or to backport parts of it in plain Lua.

It handles short options (-a, +a, -ab is the same as -a -b, etc.), long option names, typed option arguments, end-of-parsing token (-- by default as you expect), automated usage message generation. Unfortunately, the documentation is still "TODO", but you can look at a few samples below, and/or ask for assistance, by mail or on the metalua mailing list.

Program using clopts: from line 270 from line 39

mailing list:

-- Fabien.