- To not clash with exchangeStrategiesCustomizer bean name from boot
change it to shellCommonComponentFlowCustomizer.
- This was a typical copy/pasting mistake.
- 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
- New option spring.shell.command.help.grouping-mode which can be either flat/group.
- Build-in help command can now choose if to group command or just show flat list.
- Fixes#347
- 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 new ShellContext concept which now is just a way
to stash info about interaction mode where ShellRunner
can update supported mode.
- ShellMethod has a new field interactionMode which user
can use to define commands between interactive/non-interactive
modes which then prevents CommandRegistry to show
commands at runtime.
- Fixes#345
- 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.