lua-users home
lua-l archive

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

I've just spent a bit of time converting the standard lua function reference
documentation (for lua 4.0)  into a bunch of lua tables. The idea is to use
them to summon help for any "module" or function interactively while you're
in the interpreter. So for example while you were doing some interactive
testing, you could do:

> help "getinfo"

and have it tell you all about the getinfo function. This is extra keen with
readline and command completion in the interpreter.

It's still a bit rough, but it's mostly done. I thought I'd mention it in
case anyone else was interested. There could be potential other uses. My
original plan was to use it to generate a lua library man page (or pages).

You can snag the file from:

There's currently one file for each module, including Reuben's bitlib and
regexp library. The math library isn't fully documented yet though. Also
included is a rough little verification script to make sure that each entry
has the requisite fields. This could be more robust.

There aren't currently any docs on the format of the tables, or a prototype
help-getter system. Should all be self explanatory and easy, though.