- CommandRegistration now has a structure to define
it beind hidden
- Modify relevant parts to filter out hidden commands
- Essentially command is hidden from all other than
command execution
- Sample in e2e tests
- Fixes#416
- BaseComponentContext has new field terminalWidth.
- StringToStyleExpressionRenderer contains new format
for "truncate-" prefixes and this is something
what template can use to instruct max length based
on terminal width.
- Change single/multi selectors to use this feature.
- Fixes#543
- Add exception handling around new interface CommandExceptionResolver
which allows to define a chain of resolvers to process errors before
exception is bubbled up to result handlers.
- Will be foundation to add more sophisticated error handling features
compared to what spring itself have for rest layer.
- Resolver returns CommandHandlingResult holder which further can be
used to make a choice what to print into console and if spesific exit
code should be used in non-interactive mode.
- Exception handling can be defined globally and per command giving
a change for user to customise i.e. error thrown by parser.
- CommandParserExceptionResolver replaces CommandParserExceptionsExceptionResultHandler
and provides more meaninful message for missing options.
- Fixes#503
- 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.
- Fixes#548
- 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.
- Fixes#495
- While out of a box *nix don't need spesific native config as is,
windows is a different story as it needs jna/jansi stuff and i.e.
jna needs jvm native things which doesn't work without correct
graal configs.
- Relates #490
- For now port spring-native to framework config.
- 3rd party configs should go somewhere else.
- Fix changes from javax to jakarta.
- Change java settings as we now require jdk 17.
- Fixes#385
- 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
- Fix native configs for win in sample app.
- Integrate spring-native with samples app.
- Tweak e2e workflow to upload artifacts and some other generic changes.
- Relates #401
- Focus of these changes are to introduce a new command system based on
real registrations (new way) instead of continuously (old way) resolve
methods and its parameters via reflection.
- There's a lot of changes as this resolution via reflection had its
hooks almost everywhere and thus most changes are just refactorings.
- Order to understand real changes I'd start to look classes under
`org.springframework.shell.command` package as it defines new registration,
catalog and parser classes. Also samples contain new classes to demonstrate
new functionality.
- Fixes#380
- ComponentFlowAutoConfiguration which creates a builder bean
and configures ComponentFlowCustomizer to set needed
defaults for terminal, resource loader and template executor.
- Fixes#387
- Extend CommandRegistry for add/remove methods.
- For rest of shell classes move to use registry
directly instead of caching commands as registry
is not immutable anymore.
- Add new sample
- Fixes#379