seaneagan / unscripted

Define command-line interfaces using ordinary dart methods and classes.
BSD 3-Clause "New" or "Revised" License
23 stars 10 forks source link

Add `name` parameter to `Option` and `Flag` #91

Closed seaneagan closed 9 years ago

seaneagan commented 9 years ago

useful when the dart identifier doesn't map cleanly to the desire option-name e.g. when you want to use a dart reserved word as an option name.

BlackHC commented 9 years ago

I just wanted to file a similar request. Especially when you set multiple: true, you probably want your parameter name to be plural while the option would be singular:

...
@Option(name='target', multiple: true)
List<String> targets,
...

What do you think? Thanks, Andreas