Commit Graph

139 Commits

Author SHA1 Message Date
Janne Valkealahti
ec03bd92a1 Remove explicit copyright from docs index page
- Backport #1024
- Fixes #1025
2024-03-10 14:34:40 +00:00
Janne Valkealahti
65f0b317b7 Use CommandContext as method parameter
- With annotation(@Command) model it's now possible to just
  add CommandContext and it will get resolved and doesn't
  cause it to appear as an option.
- Backport #779
- Fixes #990
2024-01-26 13:52:46 +00:00
Stephen Lawrence
059c2d0144 Clarifying the confusing note 2024-01-17 07:55:40 +00:00
Janne Valkealahti
134af2dbd2 Fix alias handling with @Command annotation
- Revisit how alias commands are added using
  @Command annotation when using if/or on class
  and/or method level.
- With this change alias handling is more logical
  and there's better tests and docs.
- Backport #945
- Fixes #973
2024-01-13 12:35:35 +00:00
Janne Valkealahti
be6a25b221 Add custom local antora playbook 2024-01-13 12:13:29 +00:00
Janne Valkealahti
814ed4958f Migrate docs to antora
- This is basically copy from main branch minus all
  terminal ui things.
- Relates #971
2024-01-12 14:02:10 +00:00
Janne Valkealahti
7cf73bc0fc Add SelectItem to flow single selector api
- This change makes single/multi same on an api level
  where single selector used key/value map and multi
  selector used list of SelectItem's.
- We still keep use of map on a single select but those
  essentially go directly via SelectItem's.
- Backport #946
- Fixes #957
2023-12-18 10:04:45 +00:00
Janne Valkealahti
d2df1d611e Fix wrong groupId in docs
- Backport #852
- Fixes #880
2023-10-03 11:18:27 +01:00
Janne Valkealahti
5739df406a Context close docs
- Backport #863
- Relates #866
2023-09-21 07:48:51 +01:00
Janne Valkealahti
d86bfed773 Add primary command docs
- Backport #755
- Relates #799
2023-07-07 14:05:46 +01:00
Janne Valkealahti
4376b1dece Document CommandNotFoundMessageProvider
- Relates #793
2023-06-23 06:31:44 +01:00
Janne Valkealahti
7f9efd1374 Fix docs for option label
- Relates #732
2023-05-01 17:27:05 +01:00
Janne Valkealahti
a0ad3ad797 Support label with @Option
- Add `label` field into `@Option`. This sets option label if
  `label` field has any text.
- Fixes #732
2023-05-01 17:11:03 +01:00
Janne Valkealahti
755cf66350 Update annotation docs
- Relates #637
2023-05-01 09:25:23 +01:00
Janne Valkealahti
9d27466c6a Support explicit arity min max with @Option
- @Option now has arityMin/arityMax which if defined,
  non-negative, are used instead of arity.
- Fixes #731
2023-05-01 08:36:41 +01:00
Janne Valkealahti
c36aa41878 Use tabs in samples
- Use tabbing model from a new docs backend.
- Relates #637
2023-05-01 08:29:37 +01:00
Janne Valkealahti
b934ddeccb Polish 2023-04-10 15:56:11 +01:00
Janne Valkealahti
5a4a241cb8 Refactor short option docs
- Add e2e samples
- Add short option snippets as tabs content(to get later
  converted to an actual tabs).
- Relates #637
2023-04-10 14:48:57 +01:00
Janne Valkealahti
62e469be49 Polish naming in docs
- Relates #637
2023-04-08 17:15:47 +01:00
Janne Valkealahti
efbc223118 Refactor option basic docs
- Document better a relationship between annotation,
  legacy annotation and programmatic registration.
- Relates #637
2023-04-07 16:54:55 +01:00
Janne Valkealahti
575d95428b Update docs copyright year 2023-03-18 16:50:38 +00:00
Janne Valkealahti
a9c52e2a19 Add notes to docs about new annotation model
- Relates #637
2023-03-18 16:40:34 +00:00
Simon Verhoeven
60126b9c47 Rename setMaskCharater to setMaskCharacter 2023-03-12 16:08:54 +00:00
Janne Valkealahti
fd73531986 Document @Option long name
- Relates #637
2023-02-24 12:18:16 +00:00
Janne Valkealahti
07e08b36a7 Document registration with @Command
- Split and separate new annotations with legacy annotations
  on a registration level.
- Relates #637
2023-02-24 09:55:26 +00:00
Janne Valkealahti
44734fd634 Rename command registration doc files 2023-02-23 09:57:42 +00:00
Janne Valkealahti
a95e60dd8b Test terminal can set dimensions
- ShellTest now has fields which can be used to
  change terminal default widht/height.
- Backed by properties so can be used with
  `spring.shell.test.terminal-width` and
  `spring.shell.test.terminal-height`.
- Fixes #656
2023-02-05 15:24:36 +00:00
Janne Valkealahti
2f298ccb6a Define CommandExceptionResolver bean order
- CommandParserExceptionResolver uses default bean
  order -100.
- Fixes #634
2023-01-25 17:57:13 +00:00
Janne Valkealahti
56b9cb20ef Document String array option type
- Fixes #628
2023-01-19 11:32:37 +00:00
Janne Valkealahti
a04091c08f Support modify option names
- New OptionNameModifier which is just a Function<String,String> to
  modify a name.
- Can be defined per option in CommandRegistration.
- Can be defined as global default as bean.
- Default implementation for common case types is enabled via boot's
  config props under spring.shell.option.naming.case-type
- Support facilities for camel, kebab, snake and pascal conversions.
- Fixes #621
2023-01-15 10:02:55 +00:00
Janne Valkealahti
95e2829dc3 Revisit positional arguments
- Add better mapping logic
- Add better type conversion
- More docs for arity and positional option configuration
- Fixes #616
2023-01-13 15:11:38 +00:00
Janne Valkealahti
f91b255bda Create BuilderSupplier interface
- Fixes #607
2023-01-08 13:38:33 +00:00
Janne Valkealahti
bf2692c70c Support exception handling with annotated methods
- New annotations ExceptionResolver and ExitCode
- New needed functionality is in classes ExceptionResolverMethodResolver
  and MethodCommandExceptionResolver.
- Hook these annotations with StandardMethodTargetRegistrar and Shell classes
- Fixes #597
2023-01-01 14:51:05 +00:00
Janne Valkealahti
b98cb4926d Fix typo
- Relates #579
2022-12-08 10:02:46 +00:00
Janne Valkealahti
83e906d2e7 Document writing to console
- Relates #579
2022-12-08 09:51:59 +00:00
Janne Valkealahti
e5570ae62c Add search algo docs
- Relates #579
2022-12-06 09:00:24 +00:00
Janne Valkealahti
74c04a4964 Polish getting started
- Relates #579
2022-12-05 13:59:37 +00:00
Janne Valkealahti
ef191e66f3 Add support for global help options
- Essentially this commit registeres on default `--help` and
  `-h` options to every command and execution short circuits
  in presense of help options to help command.
- Add Supplier<CommandRegistration.Builder> as a bean which
  can be autowired registration beans.
- Make this common bean customisable via CommandRegistrationCustomizer.
- Change StandardMethodTargetRegistrar to use supplier so that
  annotated commands gets common customizations.
- Change sample commands to use supplier.
- Add new group, spring.shell.help to config props.
- Docs changes
- Fixes #582
- Fixes #585
2022-12-04 17:23:25 +00:00
Janne Valkealahti
d3e897f6d9 Add base shell test system
- NOTE: very much wip and unstable
- This commit is a first step to provide boot style
  @ShellTest annotation
- New modules spring-shell-test and spring-shell-test-autoconfigure
- Focus is to autoconfigure context without shell runners so that
  we can create "sessions" and hook to configures jline terminal
  with custom in/out streams.
- Skeleton fork from jediterm to provide basic terminal emulation
  to part of a control amd escape characters working.
- ShellTestClient is a concept user can use to interact with a shell
  in a same way user would use a "real" shell.
- Fixes #489
2022-11-30 09:09:35 +00:00
Janne Valkealahti
452145264a Register option without prefix
- While option should be defined i.e. using "--arg", discover
  prefix from ShellMethod#prefix and use that if just "arg"
  is defined.
- Fixes #575
2022-11-26 15:08:07 +00:00
Janne Valkealahti
331df77ed8 More docs for option types
- Relates #558
2022-11-23 09:28:55 +00:00
Janne Valkealahti
ef7d97f2e1 Move built-in commands from components to commands
- Relates #558
2022-11-01 05:11:33 +00:00
Janne Valkealahti
2427ec36a1 Docs about logging
- Relates #558
2022-11-01 05:00:41 +00:00
Janne Valkealahti
c6e84dcfa8 Docs about debugging
- Just linking to wiki
- Relates #558
2022-10-31 07:41:01 +00:00
Janne Valkealahti
ff41b504a7 Docs about shell runners
- Relates #558
2022-10-31 05:35:34 +00:00
Janne Valkealahti
2a3856c101 Polish appendix naming
- Relates #558
2022-10-30 06:44:50 +00:00
Janne Valkealahti
a518414015 Registration section
- Move bean/anno sections here
- Relates #558
2022-10-30 05:43:44 +00:00
Janne Valkealahti
ea76e0d205 Change native build
- Align samples build with docs
- Relates #558
2022-10-22 06:45:02 +01:00
Janne Valkealahti
7866c9666d Base docs for PathSearch
- Relates #555
2022-10-19 08:12:12 +01:00
Janne Valkealahti
3021704c29 Support hidden commands
- 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
2022-10-18 14:51:44 +01:00