diff options
author | Norbert Preining <preining@logic.at> | 2008-04-27 08:35:39 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2008-04-27 08:35:39 +0000 |
commit | df3534903c7dd93b4ad82b2f790be4c6a96cb503 (patch) | |
tree | f3a8e0b8db4771a75d68ebaf6b20dd6a2bbe4a36 /Master | |
parent | 4e458d320b302223c8b1000a4f877046207b206f (diff) |
support -- or - style
git-svn-id: svn://tug.org/texlive/trunk@7675 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf/scripts/texlive/lua/getopt.tlu | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Master/texmf/scripts/texlive/lua/getopt.tlu b/Master/texmf/scripts/texlive/lua/getopt.tlu index bdccba8c13e..2327f05698f 100644 --- a/Master/texmf/scripts/texlive/lua/getopt.tlu +++ b/Master/texmf/scripts/texlive/lua/getopt.tlu @@ -24,6 +24,9 @@ -- options["help"] = true -- options["foo"] = "f" -- options["bar"] = { "c", "d" } +-- +-- Options can start with a single or a double dash, but values may NOT be +-- separated with a =, but need to be seprate arguments! -- -- Example code for printing out the options: -- print ("OPTIONS:") @@ -47,7 +50,7 @@ function getopt(spec) while (i <= limit) do local found = false for k,v in pairs(spec) do - if (arg[i] == "--"..k) then + if (arg[i] == "--"..k or arg[i] == "-"..k) then found = true if (v == 0) then -- boolean argument |