@@ -5,54 +5,42 @@ ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs]
5
5
Short style _POSIX_ option is usually just a synonym to long format. As
6
6
shown below option `--arg` is equal to `-a`.
7
7
8
- [tabs]
9
- ====
10
- Programmatic::
11
- +
12
- [source, java, indent=0]
8
+ [source,java,indent=0,role="primary"]
9
+ .Programmatic
13
10
----
14
11
include::{snippets}/ShortOptionSnippets.java[tag=option-type-string-programmatic]
15
12
----
16
13
17
- Annotation::
18
- +
19
- [source, java, indent=0]
14
+ [source,java,indent=0,role="secondary"]
15
+ .Annotation
20
16
----
21
17
include::{snippets}/ShortOptionSnippets.java[tag=option-type-string-annotation]
22
18
----
23
19
24
- Legacy Annotation::
25
- +
26
- [source, java, indent=0]
20
+ [source,java,indent=0,role="secondary"]
21
+ .Legacy Annotation
27
22
----
28
23
include::{snippets}/ShortOptionSnippets.java[tag=option-type-string-legacyannotation]
29
24
----
30
- ====
31
25
32
26
Short option with combined format is powerful if type is defined as a flag
33
27
which means type is a _boolean_. That way you can define a presence of a flags
34
28
as `-abc`, `-abc true` or `-abc false`.
35
29
36
- [tabs]
37
- ====
38
- Programmatic::
39
- +
40
- [source, java, indent=0]
30
+ [source,java,indent=0,role="primary"]
31
+ .Programmatic
41
32
----
42
33
include::{snippets}/ShortOptionSnippets.java[tag=option-type-multiple-booleans-programmatic]
43
34
----
44
35
45
- Annotation::
46
- +
47
- [source, java, indent=0]
36
+ [source,java,indent=0,role="secondary"]
37
+ .Annotation
48
38
----
49
39
include::{snippets}/ShortOptionSnippets.java[tag=option-type-multiple-booleans-annotation]
50
40
----
51
41
52
- Legacy Annotation::
53
- +
54
- [source, java, indent=0]
42
+ [source,java,indent=0,role="secondary"]
43
+ .Legacy Annotation
55
44
----
56
45
include::{snippets}/ShortOptionSnippets.java[tag=option-type-multiple-booleans-legacyannotation]
57
46
----
58
- ====
0 commit comments