Skip to content

Support arg=value format with options #979

Open
@Martiul

Description

@Martiul

Hello,

I recently upgraded from spring-shell 2.7.5 to 3.2.0, and found that arguments of the form "arg=value" are no longer accepted.

Is this a regression, or was it intended?

Sample code:

  @ShellMethod(
      value = "Description",
      key = {"test"})
  public void test(
      @ShellOption(
          value = {"--foo", "-f"},
          defaultValue = ShellOption.NULL) String foo) {
    System.out.println("Foo is: " + foo);
  }

shell:> test --foo=bar

Expected:

Foo is: bar

Actual:

Unrecognised option '--foo=bar'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions