Allow using multiple constructor arguments for configuring elements

Disable undocumented ability to specify aliases as arguments
for constructors, e.g. parser:option("-f", "--foo"), and instead
order properties and pass constructor arguments to them.
E.g. parser:argument("foo", "A foo that bars") sets argument
name to foo and description to "A foo that bars".

TODO: remove "aliases" property, instead allow setting several
names in one string by separating them using space.
TODO: reorder properties so that most useful ones could be used
as constructor arguments.
This commit is contained in:
mpeterv
2015-06-09 21:54:18 +03:00
parent 476ad19de8
commit ff9abac990
5 changed files with 303 additions and 305 deletions

View File

@@ -53,8 +53,7 @@ An epilog. ]], parser:get_help())
:args "2"
parser:argument "maybe-fourth"
:args "?"
parser:argument "others"
:description "Optional. "
parser:argument("others", "Optional. ")
:args "*"
assert.equal([[