[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Command Line Parsing?
- From: Daurnimator <quae@...>
- Date: Tue, 12 Apr 2016 11:56:48 +1000
On 12 April 2016 at 07:00, Pierre Chapuis <firstname.lastname@example.org> wrote:
> That module modifies the "os" table for no good reason.
> Otherwise I guess it would be fine.
> Based on Lua Toolbox I would suggest:
> - argparse  Mentioned in the wiki, inspired by Python module, 5.1 to 5.3.
> - lua_cliargs  Pure Lua but maybe a bit complex, 5.1 to 5.3.
> - alt-getopt  Looks like what you wanted, but looks unmaintained and
> uses module().
>  https://lua-toolbox.com/label/16
>  https://github.com/mpeterv/argparse
>  https://github.com/amireh/lua_cliargs
>  https://github.com/LuaDist/alt-getopt
> Pierre Chapuis
My last few projects I've used https://github.com/q66/getopt.lua
But I was considering moving over to https://github.com/amireh/lua_cliargs
- Works with 5.1, 5.2 and 5.3
- pure lua => no C dependencies to build or install
- no globals (and doesn't use module())
- It's a dependency of busted, and hence already installed by many
- generates (good) help text for you
- supports subcommands