[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Command Line Parsing?
- From: Peter Aronoff <telemachus@...>
- Date: Tue, 12 Apr 2016 07:46:18 -0400
On Monday, April 11, 2016 at 09:42PM, Petite Abeille wrote:
> Preferably something in Lua, small, and more or less POSIX compliant.
You're welcome to take a look at this:
It's pretty small and meant to imitate getopt.c (warts and all), so it
should be POSIX compliant. I've been using it in personal projects for
a few years, but haven't uploaded it to LuaRocks yet since I'm not
convinced it's ready for prime time.
It only accepts short flags, which will no doubt make it less appealing to
many people. It's also low on documentation (and tests, cough), which
should make it less appealing as well. It pretty much assumes you're used
to getopt.c. There are a handful of examples in a subdirectory that serve
as both documentation and quasi-tests right now.
We have not been faced with the need to satisfy someone else's
requirements, and for this freedom we are grateful.
Dennis Ritchie and Ken Thompson, The UNIX Time-Sharing System