diff --git a/spring-shell-docs/src/main/asciidoc/using-shell-options-short.adoc b/spring-shell-docs/src/main/asciidoc/using-shell-options-short.adoc index 5b4d2811..74fce393 100644 --- a/spring-shell-docs/src/main/asciidoc/using-shell-options-short.adoc +++ b/spring-shell-docs/src/main/asciidoc/using-shell-options-short.adoc @@ -5,54 +5,42 @@ ifndef::snippets[:snippets: ../../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`. -[tabs] -==== -Programmatic:: -+ -[source, java, indent=0] +[source,java,indent=0,role="primary"] +.Programmatic ---- include::{snippets}/ShortOptionSnippets.java[tag=option-type-string-programmatic] ---- -Annotation:: -+ -[source, java, indent=0] +[source,java,indent=0,role="secondary"] +.Annotation ---- include::{snippets}/ShortOptionSnippets.java[tag=option-type-string-annotation] ---- -Legacy Annotation:: -+ -[source, java, indent=0] +[source,java,indent=0,role="secondary"] +.Legacy Annotation ---- include::{snippets}/ShortOptionSnippets.java[tag=option-type-string-legacyannotation] ---- -==== Short option with combined format is powerful if type is defined as a flag which means type is a _boolean_. That way you can define a presence of a flags as `-abc`, `-abc true` or `-abc false`. -[tabs] -==== -Programmatic:: -+ -[source, java, indent=0] +[source,java,indent=0,role="primary"] +.Programmatic ---- include::{snippets}/ShortOptionSnippets.java[tag=option-type-multiple-booleans-programmatic] ---- -Annotation:: -+ -[source, java, indent=0] +[source,java,indent=0,role="secondary"] +.Annotation ---- include::{snippets}/ShortOptionSnippets.java[tag=option-type-multiple-booleans-annotation] ---- -Legacy Annotation:: -+ -[source, java, indent=0] +[source,java,indent=0,role="secondary"] +.Legacy Annotation ---- include::{snippets}/ShortOptionSnippets.java[tag=option-type-multiple-booleans-legacyannotation] ---- -====