- 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
- 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
- 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
- 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
- This commit fixes two issues.
- Firstly complete with correct option as existing bug was
to wrongly always complete with first option which used
wrong provider.
- Secondly filter out duplicate option proposals giving better
result when options is already in place.
- Backport #495
- Fixes#498
(cherry picked from commit a143d25ffc)
- In a case where arg is given as boolean and with plain
@ShellOption (user doesn't define defaults), configure
arg not to be mandatory and with default value false.
- This brings this spesific case more close how it behave
in older shell version.
- Having `@ShellOption boolean arg1` it now works as:
my-shell:>e2e reg default-value-boolean3
Hello false
my-shell:>e2e reg default-value-boolean3 --arg1
Hello true
my-shell:>e2e reg default-value-boolean3 --arg1 false
Hello false
my-shell:>e2e reg default-value-boolean3 --arg1 true
Hello true
- Fixes#461
- Add info about aliases into model structure used by help
command templating.
- Add some tests to models.
- Change help commands list to group command and its aliases together.
- Change help command to show aliases.
- Fixes#458
- Fixes#426
- This is a re-implementation of a interactive completion
with breaking changes as it moves away from a direct use
of a MethodParameter in favour of a CommandRegistration
and its option definitions.
- Fixes#449
- Adding a concept of no-tty which in this commit simply
tracks DumbTerminal as jline creates that if there nothing
better.
- For components without tty don't go to interaction loop.
- For new sample show that we can at least manually handle
required option with a flow while command option is not
required.
- Fixes#444
- Bring back some missing functionality which got missing
during the rework to new command model.
- Polish some classes.
- Restore origin sample.
- Add availability things into help templates and its
representation model.
- Fixes#423
- Add theme settings for figures.
- Settings for styles are now in it own class and
ThemeSettings are wrapping those.
- Prefixed formatting string to have `style-` prefix.
- Templates can now use added `figures` dictionary which
is resolved per activated theme.
- Create `dump` theme.
- New `ThemeActive` interface where default impl uses dump
theme if `CI` or `NO_COLOR` env is set.
- Rework existing templates.
- Fixes#442
- New configurations to CommandRegistration
- Re-using exit code concepts from boot
- Handling exit codes only in non-interactive mode
- Adding e2e commands and tests for better coverage
- Fixes#431
- Change help command output to get templated using
model classes.
- Remove things around ParameterDescription as those are
replaced with template classes.
- Fixes for native configs.
- For now availability and aliases are removed from
help to get back in better form.
- Aliases has been partly introduced to structure.
- Fixes#422
- UserConfigPathProvider interface to provid "user-level"
config directory which can be used within a shell.
- New options which can be used to configure behaviour.
spring.shell.history.enabled
spring.shell.history.name
spring.shell.config.location
spring.shell.config.env
- Fixes#417
- Tweak flow framework so that single item selector
can be configured with a default item which is then
"exposed" automatically so that user can just hit enter.
- Fixes#414