Commit graph

2 commits

Author SHA1 Message Date
minskim
173d5f3f97 Update lua-alt-getopt to 0.7.0.
Patch provided by Aleksey Cheusov in PR 42195.

Changes:

  FIX: POSIX getopt("xo:") accepts './app -xoVVV' and './app -xo VVV'
  treating them as './app -x -o VVV'.
  Now Lua alt_getopt does the same.

  Additional regression tests/examples

  error() function is not used for exiting anymore.
  os.exit() is used instead.
2009-10-31 04:03:52 +00:00
minskim
ac0c461d43 Import lua-alt-getopt-0.6.0 from pkgsrc-wip. Packaged by Aleksey Cheusov.
lua_altgetopt is a 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"
http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap12.html#tag_12_02
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.
2009-08-02 19:49:16 +00:00