- 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
- 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
- Add new styling system which works around concept that
you use tags to request jline styles where tags comes
from an activated theme.
- There is a default theme with options to add custom
ones and change it via property.
- Add templating system which uses antlr stringtemplate which
allows to write output with a template instead of manually
crafting code.
- Add version command which integrates to Boot's BuildProperties
and GitProperties. Only version field is visible on default
and others can be enabled/disable via properties.
- Fixes#352
- Fixes#353
- Add basic support of defining a command `completion bash` which
outputs a generic bash script which can be used in a user environment.
- Idea for completion is copied from go's cobra library what comes for
a bash dance itself.
- Goes through command registry, builds a model for command structure
and uses antlr st4 for templating bash.
- Should give foundation to create other completions just like in cobra.
- Currently as we don't know a root-command in a generic way, option
`spring.shell.command.completion.root-command` is required user to set.
- Fixes#343
- Add support for running shell commands as a non-interactive mode.
- This works by adding new ShellApplicationRunner interface which is
an extension to ApplicationRunner forcing to have exactly one main
ApplicationRunner and then DefaultApplicationRunner dispatches to
new interface ShellRunner which allows to pick between script,
interactive and non-interactive, etc.
- It is sort of a breaking change but works much better not having
a need to have previous hooks between application runners to disable
things at runtime.
- All this makes it closer for a user to have a choice between
using shell commands as is without entering interactive mode.
- Also add SpringShellProperties for better config props support
for boot users.
- Fixes#342
- Replace old ConversionService impl with something more aligned
with current boot code with partially shameless copy as
shell is most likely working outside of web or webflux env
by creating FormattingConversionService and hooking convertes
from DefaultConversionService.
- This should work on most cases and giving user a hook
to define their own service.
- While project uses jdk8, you can do native build with jdk11
`./mvnw clean package -Pnative`
- You can then run these
spring-shell-samples/target/spring-shell-samples
java -jar spring-shell-samples/target/spring-shell-samples-3.0.0-SNAPSHOT-exec.jar
- Remove logback.xml in favour of spring config to workaround for
https://github.com/spring-projects-experimental/spring-native/issues/625
- For now remove jcommander command sample to get support for it #340
- Relates #323