[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- 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 <catwell@archlinux.us> wrote:
>> https://github.com/edartuz/lua-cmdl
>
> That module modifies the "os" table for no good reason.
> Otherwise I guess it would be fine.
>
> Based on Lua Toolbox [1]I would suggest:
>
> - argparse [2] Mentioned in the wiki, inspired by Python module, 5.1 to 5.3.
> - lua_cliargs [3] Pure Lua but maybe a bit complex, 5.1 to 5.3.
> - alt-getopt [4] Looks like what you wanted, but looks unmaintained and
> uses module().
>
>
> [1] https://lua-toolbox.com/label/16
> [2] https://github.com/mpeterv/argparse
> [3] https://github.com/amireh/lua_cliargs
> [4] 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
Why 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
lua developers
- generates (good) help text for you
- supports subcommands