Software /
code /
clix
Diff
clix.lua @ 8:df4cb4a73549
clix: Make short_opts table global, to allow commands to add their own short options
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 07 Jan 2010 02:05:48 +0000 |
parent | 7:6078e8d2b59d |
child | 11:a502c905527c |
line wrap: on
line diff
--- a/clix.lua Thu Jan 07 02:05:16 2010 +0000 +++ b/clix.lua Thu Jan 07 02:05:48 2010 +0000 @@ -8,6 +8,9 @@ require "verse" require "verse.client" +-- Global to allow commands to add to it +short_opts = { v = "verbose", t = "to", f = "from", e = "type", a = "account", p = "password" } + local command = arg[1]; if not command then @@ -83,7 +86,6 @@ table.remove(arg,1); -local short_opts = { v = "verbose", t = "to", f = "from", e = "type", a = "account", p = "password" } local opts = {}; local args_handled_up_to;