This version is still in development and is not considered stable yet. For the latest stable version, please use Spring Shell 3.3.3! |
Options
Command line arguments can be separated into options and positional parameters. Following sections describes features how options are defined and used. We first go through some basics about using options and then go into details about various ways how options and arguments works.
Generally speaking an option is something after a commands prefixed with
either -
or --
. An option can either have a value or not depending
on its context.
Options can be defined with a target method using annotations with a method
arguments or with programmatically using CommandRegistration
.
In below sections @ShellOption refer to a legacy annotation model
and @Option refer to an annotation model.
|