This repository has been archived by the owner on Nov 20, 2020. It is now read-only.
Process application arguments the same way as getopt_long
LuaDist/alt-getopt
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
master
Could not load branches
Nothing to show
Could not load tags
Nothing to show
{{ refName }}
default
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code
-
Clone
Use Git or checkout with SVN using the web URL.
Work fast with our official CLI. Learn more.
- Open with GitHub Desktop
- Download ZIP
Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
Latest commit
Git stats
Files
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
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" 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. 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. Makefile: 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 http://luaforge.net/project/lua_altgetopt or send me bugreport directly. Author: Aleksey Cheusov <vle@gmx.net>
About
Process application arguments the same way as getopt_long
Resources
Stars
Watchers
Forks
Packages 0
No packages published