Skip to content

Missing option error without ShellOption #446

Closed
@ullenboom

Description

@ullenboom

I was replicating the very basic shell component https://github.com/spring-projects/spring-shell/blob/main/spring-shell-samples/src/main/java/org/springframework/shell/samples/standard/Commands.java

@ShellComponent
public class FsCommands {
 @ShellMethod("Add numbers.")
  public int add(int a, int b, int c) {
    return a + b + c;
  }
}

and got an error:

shell:>add 1 2 3
Missing option, longnames='a', shortnames=''
Missing option, longnames='b', shortnames=''
Missing option, longnames='c', shortnames=''

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions