diff --git a/spring-shell-docs/modules/ROOT/nav.adoc b/spring-shell-docs/modules/ROOT/nav.adoc index e8560774..4b422af7 100644 --- a/spring-shell-docs/modules/ROOT/nav.adoc +++ b/spring-shell-docs/modules/ROOT/nav.adoc @@ -26,20 +26,20 @@ *** xref:using-shell-commands-builtin-completion.adoc[] *** xref:using-shell-commands-builtin-version.adoc[] ** xref:using-shell-commands-writing.adoc[] -* xref:using-shell-options.adoc[] -** xref:using-shell-options-basics.adoc[] -*** xref:using-shell-options-basics-programmatic.adoc[] -*** xref:using-shell-options-basics-annotation.adoc[] -*** xref:using-shell-options-basics-legacyannotation.adoc[] -** xref:using-shell-options-short.adoc[] -** xref:using-shell-options-arity.adoc[] -** xref:using-shell-options-positional.adoc[] -** xref:using-shell-options-optional.adoc[] -** xref:using-shell-options-default.adoc[] -** xref:using-shell-options-validation.adoc[] -** xref:using-shell-options-label.adoc[] -** xref:using-shell-options-types.adoc[] -** xref:using-shell-options-naming.adoc[] +* xref:options/index.adoc[] +** xref:options/basics/index.adoc[] +*** xref:options/basics/programmatic.adoc[] +*** xref:options/basics/annotation.adoc[] +*** xref:options/basics/legacyannotation.adoc[] +** xref:options/short.adoc[] +** xref:options/arity.adoc[] +** xref:options/positional.adoc[] +** xref:options/optional.adoc[] +** xref:options/default.adoc[] +** xref:options/validation.adoc[] +** xref:options/label.adoc[] +** xref:options/types.adoc[] +** xref:options/naming.adoc[] * xref:using-shell-completion.adoc[] * xref:using-shell-building.adoc[] * xref:using-shell-components.adoc[] diff --git a/spring-shell-docs/modules/ROOT/pages/using-shell-options-arity.adoc b/spring-shell-docs/modules/ROOT/pages/options/arity.adoc similarity index 96% rename from spring-shell-docs/modules/ROOT/pages/using-shell-options-arity.adoc rename to spring-shell-docs/modules/ROOT/pages/options/arity.adoc index 87ed4f8e..87e76828 100644 --- a/spring-shell-docs/modules/ROOT/pages/using-shell-options-arity.adoc +++ b/spring-shell-docs/modules/ROOT/pages/options/arity.adoc @@ -1,7 +1,7 @@ [[using-shell-options-arity]] = Arity -ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs] +ifndef::snippets[:snippets: ../../../../src/test/java/org/springframework/shell/docs] Arity defines how many parameters option parsing takes. diff --git a/spring-shell-docs/modules/ROOT/pages/using-shell-options-basics-annotation.adoc b/spring-shell-docs/modules/ROOT/pages/options/basics/annotation.adoc similarity index 77% rename from spring-shell-docs/modules/ROOT/pages/using-shell-options-basics-annotation.adoc rename to spring-shell-docs/modules/ROOT/pages/options/basics/annotation.adoc index 60f134d4..d4402d6b 100644 --- a/spring-shell-docs/modules/ROOT/pages/using-shell-options-basics-annotation.adoc +++ b/spring-shell-docs/modules/ROOT/pages/options/basics/annotation.adoc @@ -2,7 +2,7 @@ = Annotation :page-section-summary-toc: 1 -ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs] +ifndef::snippets[:snippets: ../../../../../src/test/java/org/springframework/shell/docs] `Option` annotation can be used to define an option name if you don't want it to be same as argument name. diff --git a/spring-shell-docs/modules/ROOT/pages/using-shell-options-basics.adoc b/spring-shell-docs/modules/ROOT/pages/options/basics/index.adoc similarity index 75% rename from spring-shell-docs/modules/ROOT/pages/using-shell-options-basics.adoc rename to spring-shell-docs/modules/ROOT/pages/options/basics/index.adoc index 6a155c31..2c1bb3f8 100644 --- a/spring-shell-docs/modules/ROOT/pages/using-shell-options-basics.adoc +++ b/spring-shell-docs/modules/ROOT/pages/options/basics/index.adoc @@ -2,7 +2,7 @@ = Basics :page-section-summary-toc: 1 -ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs] +ifndef::snippets[:snippets: ../../../../../src/test/java/org/springframework/shell/docs] This section gives a generic idea how an option can be defined. Following sections, beyond basics, discuss more about how various option behaviour diff --git a/spring-shell-docs/modules/ROOT/pages/using-shell-options-basics-legacyannotation.adoc b/spring-shell-docs/modules/ROOT/pages/options/basics/legacyannotation.adoc similarity index 88% rename from spring-shell-docs/modules/ROOT/pages/using-shell-options-basics-legacyannotation.adoc rename to spring-shell-docs/modules/ROOT/pages/options/basics/legacyannotation.adoc index dc52072f..d8edfab2 100644 --- a/spring-shell-docs/modules/ROOT/pages/using-shell-options-basics-legacyannotation.adoc +++ b/spring-shell-docs/modules/ROOT/pages/options/basics/legacyannotation.adoc @@ -1,7 +1,7 @@ [[using-shell-options-basics-legacyannotation]] = Legacy Annotation -ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs] +ifndef::snippets[:snippets: ../../../../../src/test/java/org/springframework/shell/docs] Having a target method with argument is automatically registered with a matching argument name. diff --git a/spring-shell-docs/modules/ROOT/pages/using-shell-options-basics-programmatic.adoc b/spring-shell-docs/modules/ROOT/pages/options/basics/programmatic.adoc similarity index 84% rename from spring-shell-docs/modules/ROOT/pages/using-shell-options-basics-programmatic.adoc rename to spring-shell-docs/modules/ROOT/pages/options/basics/programmatic.adoc index 8a61da1f..58cfabe6 100644 --- a/spring-shell-docs/modules/ROOT/pages/using-shell-options-basics-programmatic.adoc +++ b/spring-shell-docs/modules/ROOT/pages/options/basics/programmatic.adoc @@ -3,7 +3,7 @@ = Programmatic :page-section-summary-toc: 1 -ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs] +ifndef::snippets[:snippets: ../../../../../src/test/java/org/springframework/shell/docs] Programmatic way with `CommandRegistration` is to use `withOption` to define an option. diff --git a/spring-shell-docs/modules/ROOT/pages/using-shell-options-default.adoc b/spring-shell-docs/modules/ROOT/pages/options/default.adoc similarity index 80% rename from spring-shell-docs/modules/ROOT/pages/using-shell-options-default.adoc rename to spring-shell-docs/modules/ROOT/pages/options/default.adoc index 2dcbab8c..6d48870c 100644 --- a/spring-shell-docs/modules/ROOT/pages/using-shell-options-default.adoc +++ b/spring-shell-docs/modules/ROOT/pages/options/default.adoc @@ -1,10 +1,10 @@ [[using-shell-options-default]] = Default Value -ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs] +ifndef::snippets[:snippets: ../../../../src/test/java/org/springframework/shell/docs] Having a default value for an option is somewhat related to -xref:using-shell-options-optional.adoc[Optional Value], as there are cases where you +xref:options/optional.adoc[Optional Value], as there are cases where you may want to know if the user defined an option and change behavior based on a default value: diff --git a/spring-shell-docs/modules/ROOT/pages/using-shell-options.adoc b/spring-shell-docs/modules/ROOT/pages/options/index.adoc similarity index 89% rename from spring-shell-docs/modules/ROOT/pages/using-shell-options.adoc rename to spring-shell-docs/modules/ROOT/pages/options/index.adoc index 04b0532e..bcae7dc4 100644 --- a/spring-shell-docs/modules/ROOT/pages/using-shell-options.adoc +++ b/spring-shell-docs/modules/ROOT/pages/options/index.adoc @@ -1,7 +1,7 @@ [[using-shell-options]] = Options -ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs] +ifndef::snippets[:snippets: ../../../../src/test/java/org/springframework/shell/docs] Command line arguments can be separated into options and positional parameters. Following sections describes features how options are defined and used. We first diff --git a/spring-shell-docs/modules/ROOT/pages/using-shell-options-label.adoc b/spring-shell-docs/modules/ROOT/pages/options/label.adoc similarity index 91% rename from spring-shell-docs/modules/ROOT/pages/using-shell-options-label.adoc rename to spring-shell-docs/modules/ROOT/pages/options/label.adoc index 726c8534..f9f89f2a 100644 --- a/spring-shell-docs/modules/ROOT/pages/using-shell-options-label.adoc +++ b/spring-shell-docs/modules/ROOT/pages/options/label.adoc @@ -1,7 +1,7 @@ [[using-shell-options-label]] = Label -ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs] +ifndef::snippets[:snippets: ../../../../src/test/java/org/springframework/shell/docs] _Option Label_ has no functional behaviour within a shell itself other than what a default `help` command outputs. Within a command documentation diff --git a/spring-shell-docs/modules/ROOT/pages/using-shell-options-naming.adoc b/spring-shell-docs/modules/ROOT/pages/options/naming.adoc similarity index 96% rename from spring-shell-docs/modules/ROOT/pages/using-shell-options-naming.adoc rename to spring-shell-docs/modules/ROOT/pages/options/naming.adoc index d224b924..4d07542f 100644 --- a/spring-shell-docs/modules/ROOT/pages/using-shell-options-naming.adoc +++ b/spring-shell-docs/modules/ROOT/pages/options/naming.adoc @@ -1,7 +1,7 @@ [[using-shell-options-naming]] = Naming -ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs] +ifndef::snippets[:snippets: ../../../../src/test/java/org/springframework/shell/docs] If there is a need to modify option long names that can be done using `OptionNameModifier` interface which is a simple diff --git a/spring-shell-docs/modules/ROOT/pages/using-shell-options-optional.adoc b/spring-shell-docs/modules/ROOT/pages/options/optional.adoc similarity index 92% rename from spring-shell-docs/modules/ROOT/pages/using-shell-options-optional.adoc rename to spring-shell-docs/modules/ROOT/pages/options/optional.adoc index ee0d3b4a..60dfbe35 100644 --- a/spring-shell-docs/modules/ROOT/pages/using-shell-options-optional.adoc +++ b/spring-shell-docs/modules/ROOT/pages/options/optional.adoc @@ -1,7 +1,7 @@ [[using-shell-options-optional]] = Optional Value -ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs] +ifndef::snippets[:snippets: ../../../../src/test/java/org/springframework/shell/docs] An option is either required or not and, generally speaking, how it behaves depends on a command target. diff --git a/spring-shell-docs/modules/ROOT/pages/using-shell-options-positional.adoc b/spring-shell-docs/modules/ROOT/pages/options/positional.adoc similarity index 94% rename from spring-shell-docs/modules/ROOT/pages/using-shell-options-positional.adoc rename to spring-shell-docs/modules/ROOT/pages/options/positional.adoc index 608c0726..e35e845c 100644 --- a/spring-shell-docs/modules/ROOT/pages/using-shell-options-positional.adoc +++ b/spring-shell-docs/modules/ROOT/pages/options/positional.adoc @@ -1,7 +1,7 @@ [[using-shell-options-positional]] = Positional -ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs] +ifndef::snippets[:snippets: ../../../../src/test/java/org/springframework/shell/docs] Positional information is mostly related to a command target method: diff --git a/spring-shell-docs/modules/ROOT/pages/using-shell-options-short.adoc b/spring-shell-docs/modules/ROOT/pages/options/short.adoc similarity index 93% rename from spring-shell-docs/modules/ROOT/pages/using-shell-options-short.adoc rename to spring-shell-docs/modules/ROOT/pages/options/short.adoc index b6f11d5e..11b87096 100644 --- a/spring-shell-docs/modules/ROOT/pages/using-shell-options-short.adoc +++ b/spring-shell-docs/modules/ROOT/pages/options/short.adoc @@ -1,7 +1,7 @@ [[using-shell-options-short]] = Short Format -ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs] +ifndef::snippets[:snippets: ../../../../src/test/java/org/springframework/shell/docs] Short style _POSIX_ option is usually just a synonym to long format. As shown below option `--arg` is equal to `-a`. diff --git a/spring-shell-docs/modules/ROOT/pages/using-shell-options-types.adoc b/spring-shell-docs/modules/ROOT/pages/options/types.adoc similarity index 96% rename from spring-shell-docs/modules/ROOT/pages/using-shell-options-types.adoc rename to spring-shell-docs/modules/ROOT/pages/options/types.adoc index 072b5a30..3f46ca19 100644 --- a/spring-shell-docs/modules/ROOT/pages/using-shell-options-types.adoc +++ b/spring-shell-docs/modules/ROOT/pages/options/types.adoc @@ -1,7 +1,7 @@ [[using-shell-options-types]] = Types -ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs] +ifndef::snippets[:snippets: ../../../../src/test/java/org/springframework/shell/docs] This section talks about how particular data type is used as an option value. diff --git a/spring-shell-docs/modules/ROOT/pages/using-shell-options-validation.adoc b/spring-shell-docs/modules/ROOT/pages/options/validation.adoc similarity index 100% rename from spring-shell-docs/modules/ROOT/pages/using-shell-options-validation.adoc rename to spring-shell-docs/modules/ROOT/pages/options/validation.adoc