mirror of
https://github.com/TangentFoxy/argparse.git
synced 2025-07-28 02:52:20 +00:00
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:
@@ -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([[
|
||||
|
Reference in New Issue
Block a user