- 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
- 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
- For title styling change from bold,fg:bright-white
to bold which should work better with different
terminal color settings as forcing it into bright white
is a bad idea.
- Fixes#476
- For annotated methods with arguments, change default arity
to zero with booleans and one everything else regardless
if @ShellOption is defined or not.
- OptionArity.ZERO_OR_ONE had wrong upperbound value, change
from MAX to 1.
- These modification should take us a bit closer to old
shell functionality and what ShellOption documents for arity.
- For old functionality I'm referring to method
`add(int a, int b)` and/or having @ShellOption and/or without
arity setting.
- Fixes#446
- Use same interface type in a generic interactive completions
in a method level and option value level.
- Change CompletionResolver to have same function signature
as with options and use CompletionContext to keep
relevant information.
- Fixes#449
- 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
- Add ShellConversionServiceSupplier interface to define
shell spesific ConversionService so that we don't
get trouble with other services in boot.
- Fixes#435
- 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 how errors are printed for interactive
vs non-interactive mode.
- This now changes behaviour so that stacktrace is printed
if non-interactive mode is active so that user has a change
to see the full error.
- Fixes#427
- 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
- Change parser to user conversion service to attempt
conversion from a default value to an expected type.
- Make more use of shellConversionService bean so that
we use the one which can be customized.
- 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
- 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
- Fix issue when empty args resulted runner to
think it should handle this scenario effectively
hijacking interactive mode.
- This bug were added by previous rework on #372
Also:
* Rename ThemeResolver bean to avoid clash w/ Spring Boot registered ThemeResolver
* Move shell runner precedence to public static field to allow extension/access
- Now passing version command attributes
even if those are nulls(not set) as ST
logs those in a listener as errors while
it doesn't cause any failures.
- Change all LoggingSTErrorListener methods
into debug level to limit more noise.
- Fixes#363
- New ConfirmationInput component
- Add missing native resource config for templates.
- Add sample "component confirmation", use flag --no
to switch default from yes to no.
- Fixes#366
- Add a feature to define a mask character for StringInput
which help when there's a need to as something sensitive.
- This masks both input and result value.
- Add first preliminary model of building and working with
higher level components.
- Components for text input, path input, single selector and
multi selector.
- Components renderings are based on ANTLR ST templates while
there is support for building rendering output manually.
- Add these into sample.
- This is a base of additional work what goes to these components
and concepts around it.
- Relates #360