- In `CommandRegistration` add `ResolvableType` for `OptionSpec` giving
more spesific handling of a type.
- In `CommandParser` handle source and target types so that we
have generics with `List`, `Set` and arrays working better.
- In `HandlerMethodArgumentResolver` add better handling for
`ConversionService` for generic types.
- In `StandardMethodTargetRegistrar` add better types via `ResolvableType`
now that `CommandRegistration` support it.
- In `OptionConversionCommands` remove converter from `String` to `Set` as
now things should work as is if generic in a `Set` has a converter.
- Fixes#694
- When target is set and only one option argument is given,
we should not convert to list as user expects string to xxx
Converter to work.
- This is how it used to work and previous changes caused
regression.
- Bug is actually in an old parser and new parser works fine.
- Backport #667
- Fixes#669
- Now lexing better with valid options
- Only report unrecognised option with double dash
as current parser don't have structure to do
deeper analysis.
- Backport #651
- Fixes#653
- Handle any option collection type so that list is generated for
values, this then works well when actual type conversions happen.
- Backport #630
- Fixes#631
- Issue in #622 is that its command type is `String` and internally
some incoming arguments(it's List) were converted to String by
joining with space. This caused one case with help command to get
conversion via spring's ConversionService(CollectionToStringConverter)
which joins by commas. That was we saw in failed example.
- Remove needed joins in CommandParser and let it just pass List which
then works better with ConversionService.
- This then needs a `command` option type change from String to String[]
which it really is as you should be able to give whole command as
an argument.
- Backport #622
- Fixes#623
- Introduce new error TooManyArgumentsOptionException
and NotEnoughArgumentsOptionException.
- Parser not tracks arity min/max and imposes
if num of option arguments.
- Backport #614
- Fixes#615
- Original commit this sources had some additional changes
which is not possible to merge.
- This commit modifies CommandParser to better track positional parameters
which previously used to go there for non-recognised options. Now using
relatively dump logic of just checking if first positional parameter starts
with '-' which indicates it's a candidate for a new `UnrecognisedOptionException`
which then would give user an error "Unrecognised option '--xxx'" for example.
- Backport #601
- Backport #602
- Fixes#603
- Fixes#604
- While option should be defined i.e. using "--arg", discover
prefix from ShellMethod#prefix and use that if just "arg"
is defined.
- Backport #575
- Fixes#577
- NonInteractiveShellRunner has a trouble where incoming
argument loses info about "quoted" string which is handled
by OS terminal.
- Add re-quoting in presense of a whitespace so that
jline parser can detect it correctly.
- Backport #567
- Fixes#570
- Modify CommandParser to convert given option value if its type is defined
- This change makes option default value to behave same as given value
what comes for the actual value in a CommandContext.
- Backport #548
- Fixes#549