Migrate Structure

This commit is contained in:
Rob Winch
2023-08-03 11:11:12 -05:00
parent 2ba6990f72
commit 9b5ed3a9eb
96 changed files with 8 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
[[using-shell-options-basics-registration]]
[[using-shell-options-basics-programmatic]]
==== Programmatic
ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs]
Programmatic way with `CommandRegistration` is to use `withOption` to define
an option.
====
[source, java, indent=0]
----
include::{snippets}/OptionSnippets.java[tag=option-registration-longarg]
----
====
`CommandRegistration` can be defined as a bean or manually registered
with a `CommandCatalog`.
NOTE: Check below sections for other option types, i.e. short format.