Commit Graph

844 Commits

Author SHA1 Message Date
Janne Valkealahti
b024b3db3f Fix wrong parser message
- Parser error message gave wrong lower level arity value
  if option didn't have enough arguments
- Backport #930
- Fixes #939
2023-11-27 14:31:51 +00:00
Janne Valkealahti
00529b6fb2 Upgrade spring-boot 3.1.6
- Fixes #933
2023-11-23 13:24:48 +00:00
Janne Valkealahti
d475b963e7 Basic zsh completion support
- This adds basic zsh support similarly to
  existing bash completion
- New command "completion zsh"
- Fix internal recursive command completion model for
  cases with deep nested commands
- Backport #927
- Fixes #929
2023-11-16 15:48:02 +00:00
github-actions[bot]
e890d35bf6 Next development version 2023-11-08 09:46:31 +00:00
Janne Valkealahti
5df2d35e9b Pin python 3.11 in e2e tests
- Relates #909
2023-11-07 12:47:57 +00:00
icodening
3e80d8d767 Bugfix: Tab-completion fails
- Backport #902
- Fixes #920
2023-11-06 18:09:13 +00:00
Janne Valkealahti
46b38a0a85 Upgrade jline 3.24.1
- Disable jni terminal provider in test ShellAutoConfiguration
  like it's done for jna/jansi
- Default TerminalBuilder system outpu to SysOut to restore
  writing to stdout instead of stderr when redirect exists
- Backport #891
- Backport #901
- Fixes #913
- Fixes #910
2023-11-03 17:05:31 +00:00
Eddie
db212a3831 Update StringTemplate version in gradle.properties
Newer version contains bugfixes
Backport #886
Fixes #888
2023-10-19 16:45:50 +01:00
Janne Valkealahti
2952c42a51 Upgrade spring-boot 3.1.5
- Fixes #894
2023-10-19 14:34:36 +01:00
github-actions[bot]
e08e087a0e Next development version 2023-10-03 12:25:47 +00:00
Janne Valkealahti
d2df1d611e Fix wrong groupId in docs
- Backport #852
- Fixes #880
2023-10-03 11:18:27 +01:00
Janne Valkealahti
b40e9f6339 Upgrade spring-boot 3.1.4
- Fixes #870
2023-09-21 12:53:32 +01:00
Janne Valkealahti
5739df406a Context close docs
- Backport #863
- Relates #866
2023-09-21 07:48:51 +01:00
Janne Valkealahti
b9be826c9c Optionally close context after command logic
- spring.shell.context.close=true adds ApplicationListerner
  which attempts to close context with ApplicationReadyEvent.
- Backport #863
- Relates #866
2023-09-21 07:34:08 +01:00
Janne Valkealahti
17b732142d Upgrade spring-boot 3.1.3
- Fixes #859
2023-08-25 09:31:03 +03:00
github-actions[bot]
234bde5415 Next development version 2023-07-26 12:45:55 +00:00
Janne Valkealahti
9801eab258 Update nexus timeouts 2023-07-26 08:47:36 +01:00
MJ Gallego
649cb68c14 Completion proposal support for complete jline parameter
- to allow completing single argument with multiple tab clicks,
  for example file paths.
- Backport #512
- Fixes #836
2023-07-25 09:58:22 +01:00
Janne Valkealahti
1caeacfb9c Upgrade spring-boot 3.1.2
- Fixes #819
2023-07-20 14:48:57 +01:00
Janne Valkealahti
9531504261 Polish error messages
- Polish mandatory option message by using
  same format as in 3.0.x. (old parser)
- Remove prefixed code/position parts from
  all messages coming from a parser. (new parser)
- Backport #815
- Fixes #816
2023-07-19 08:12:54 +01:00
Janne Valkealahti
d86bfed773 Add primary command docs
- Backport #755
- Relates #799
2023-07-07 14:05:46 +01:00
Janne Valkealahti
051f7da5dc Add primary command feature
- NonInteractiveShellRunner can now shortcircuit into primary command
  just running it and passing args.
- Add hooks into autoconfig so that this is easy to configure.
- Backport #755
- Relates #799
2023-07-07 14:05:05 +01:00
github-actions[bot]
f388a30716 Next development version 2023-06-27 07:26:26 +00:00
Janne Valkealahti
3cfe03b25d Add run-name to release workflow 2023-06-27 07:42:40 +01:00
Janne Valkealahti
8b6e040f5e Add timeout for native build 2023-06-26 13:09:12 +01:00
Janne Valkealahti
4376b1dece Document CommandNotFoundMessageProvider
- Relates #793
2023-06-23 06:31:44 +01:00
Janne Valkealahti
4aecebd542 Add run-name for e2e 2023-06-23 05:45:02 +01:00
Janne Valkealahti
d36b9d83fc Upgrade spring-boot 3.1.1
- Fixes #786
2023-06-22 16:41:23 +01:00
Janne Valkealahti
ff60039c85 Fix alias usage with Command annotation
- Fix alias command extraction from existing @Command
  annotations so that we actually get multiple aliases
  defined if more than one defined on a method level.
- Fix rendering issue in a help stg template when
  multiple aliases exists.
- Backport #796
- Fixes #798
2023-06-22 16:37:06 +01:00
Janne Valkealahti
0edf4eb450 Fix parser handling of positional args
- Change to have better support for args like:

    "--arg1 a --arg2 b"
    "--arg1 a --arg2 b c"
    "--arg1 a c --arg2 b c"
    "c --arg1 a --arg2 b"

  where option can have default values and position of
  positional args doesn't matter that much.
- Make parser to be aware of if it's handling last option
  so that we can differentiate if error can be given i.e.
  with too many args, etc.
- Backport #795
- Fixes #797
2023-06-22 09:53:59 +01:00
Janne Valkealahti
d1592456a5 Make command not found configurable
- New CommandNotFoundResultHandler which handles
  CommandNotFound to be able to customize error shown.
- New CommandNotFoundMessageProvider which is a plain
  function given a "context" and returns a string.
  Context contains common info to provide better
  error messages.
- Default provider gives same message but
  removes long stacktrace(which previously originated
  from a common ThrowableResultHandler.
- Backport #778
- Relates #793
2023-06-20 12:33:54 +01:00
Janne Valkealahti
ee94ba37ef Add better support for modified option names
- Longnames in a command option if modified via
  name modifier didn't provide enough backmapping
  info for command execution experience being accurate.
- Add new getLongNamesModified() into CommandOption
  which is populated if name modifier is used.
- Add more hints in CommandExecution for modified
  option names.
- This should bring annotation, legacy annotation
  and programmatic commands up to date.
- Backport #777
- Fixes #783
2023-06-19 12:38:51 +01:00
Janne Valkealahti
641aee4411 Prepare maintenance branch for 3.1.x 2023-06-14 16:22:08 +01:00
Janne Valkealahti
7e634bb80e Polish 2023-06-13 15:45:38 +01:00
github-actions[bot]
e8443486c3 Next development version 2023-06-13 13:29:18 +00:00
Janne Valkealahti
3d39ef3518 Discard empty args
- Take 2 of #763
- Revert changes in 06e89dcca3
  what comes for `ExtendedDefaultParser`.
- Discard empty args in a `Shell` coming from `ExtendedDefaultParser`
- `ExtendedDefaultParserTests` has more tests, some commented out, to
  see some differences for jline default parser impl. Something
  to get handled in #517
2023-06-12 10:12:52 +01:00
Janne Valkealahti
042d56e7e3 Add HandlerMethodArgumentResolver for @Option
- New OptionMethodArgumentResolver which is similar
  than ShellOptionMethodArgumentResolver for @ShellOption.
- Add missing annotation commands for e2e test command.
- Fixes #767
2023-06-07 15:28:57 +01:00
Janne Valkealahti
afacf86ac5 Add jna native hints for linux
- Need for libjnidispatch.so, CLibrary$termios
  and CLibrary$winsize.
- Fixes #762
2023-06-07 14:13:35 +01:00
Janne Valkealahti
06e89dcca3 ExtendedDefaultParser should not add empty arguments
- Fixes issue when last "word" is within quotes and
  cursor is at the end of a line which caused empty
  "word" string in an argument list.
- This then caused i.e. string option to have a collection
  as an input(if no arity settings used) and via
  spring conversions a comma were added.
- Fixes #763
2023-06-07 08:28:17 +01:00
Janne Valkealahti
58e3a5eec6 Add central close workflow 2023-06-05 12:14:08 +01:00
Janne Valkealahti
1e68e3ed65 Update labels 2023-06-02 15:36:45 +01:00
Janne Valkealahti
65ef14856e Update schedule-e2e workflow 2023-06-02 06:29:34 +01:00
Janne Valkealahti
36712e4ac2 Update schedule-e2e workflow 2023-06-02 06:25:34 +01:00
Janne Valkealahti
f2a48a061d Test help command with e2e tests
- Fixes #756
2023-06-02 06:19:12 +01:00
Janne Valkealahti
af34526e82 Add hints for Availability targets
- Annotate ShellComponent with @Reflective and use custom
  AvailabilityReflectiveProcessor to find possible method
  targets returning Availability.
- Fixes #747
2023-06-01 21:17:29 +01:00
Janne Valkealahti
f6f979a04c Update e2e readme 2023-06-01 09:08:16 +01:00
Janne Valkealahti
f2240a2c5e Schedule e2e in main and 3.0.x 2023-06-01 08:43:31 +01:00
Janne Valkealahti
c125c46010 Add short options into valid tokens
- Add short options as valid tokens in a `CommandModel` so that Lexer
  create tokens with accurate info and doesn't then cascade this issue
  in Ast and Parser.
- Previously with a command `command -a aaa -b bbb` tokenisation resulted
  `COMMAND OPTION ARGUMENT ARGUMENT ARGUMENT` with multiple short options
  while it should have been `COMMAND OPTION ARGUMENT OPTION ARGUMENT`.
- Relates #757
2023-05-31 17:28:21 +01:00
Janne Valkealahti
8cba636fdb Remove unused ci-publish workflow 2023-05-28 16:33:31 +01:00
Janne Valkealahti
96ef260d1e Update labels 2023-05-25 20:57:35 +01:00