CTAN Comprehensive TeX Archive Network

Direc­tory support/lua/lua-alt-getopt

lua_altgetopt is a MIT-licenced module for Lua programming language
for processing application's arguments the same way
BSD/GNU getopt_long(3) functions do.

Main features and goals:
1) compatibility to SUS "Utility Syntax Guidelines"
guidelines 3-13.
2) This module is for plain Lua
2) No extra dependencies
3) No hooks, no functional tricks ;-)
4) Support for long options, e.g. compatibility with getopt_long(3) C function
   present in *BSD and GNU libc.
5) Long options may optionally have one-char synonym or other long synonym
6) Strict error checking (checks for an incorrect use of options)
7) alt_getopt.lua is a Lua module.

In particular alt_getopt.lua supports the following
   -kVALUE, -k VALUE, --key=VALUE, --key VALUE,
   -abcd is equivalent to -a -b -c -d if neither of them accept value.
All options must be declared as accepting value or not.

Two ways of options handling are provided.
See alt_getopt application which is a part of regression tests.

It's probably useless for end users, you can copy alt_getopt.lua
to the destination yourself. Otherwise use BSD make,
NetBSD make is preferred because NetBSD is my development platform.

If 'make test' fails on your platform/Lua, please let me know.
If you find a a bug, register it here
or send me bugreport directly.

Author: Aleksey Cheusov <vle@gmx.net>

lua-alt-getopt – Pro­cess ap­pli­ca­tion ar­gu­ments the same way as getopt_long

lua_altge­topt is a MIT-li­censed mod­ule for Lua, for pro­cess­ing ap­pli­ca­tion ar­gu­ments in the same way as BSD/GNU getopt_long(3) func­tions do.

This mod­ule is made avail­able for lua script writ­ers to have con­sis­tent com­mand line pars­ing rou­tines.

Li­censesMIT Li­cense
Copy­right2009 Alek­sey Cheusov
Main­tainerAlek­sey Cheusov
Khaled Hosny
Con­tained inTeX Live as lua-alt-getopt
MiKTeX as lua-alt-getopt
TopicsLua supp
Guest Book Sitemap Contact Contact Author