Skip to content

Commit f846e7e

Browse files
committed
Insert explicit ids for headers
1 parent 9b5ed3a commit f846e7e

17 files changed

+35
-1
lines changed

spring-shell-docs/modules/ROOT/pages/appendices-techical-intro-commandcatalog.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
[[command-catalog]]
12
=== Command Catalog
23
The `CommandCatalog` interface defines how command registrations exist in
34
a shell application. It is possible to dynamically register and de-register
@@ -11,6 +12,7 @@ include::{snippets}/CommandCatalogSnippets.java[tag=snippet1]
1112
----
1213
====
1314

15+
[[command-resolver]]
1416
==== Command Resolver
1517
You can implement the `CommandResolver` interface and define a bean to dynamically
1618
resolve mappings from a command's name to its `CommandRegistration` instances. Consider
@@ -27,6 +29,7 @@ IMPORTANT: A current limitation of a `CommandResolver` is that it is used every
2729
Thus, we advise not using it if a command resolution call takes a long time, as it would
2830
make the shell feel sluggish.
2931

32+
[[command-catalog-customizer]]
3033
==== Command Catalog Customizer
3134
You can use the `CommandCatalogCustomizer` interface to customize a `CommandCatalog`.
3235
Its main use is to modify a catalog. Also, within `spring-shell` auto-configuration, this

spring-shell-docs/modules/ROOT/pages/appendices-techical-intro-commandcontext.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
[[command-context]]
12
=== Command Context
23
The `CommandContext` interface gives access to a currently running
34
context. You can use it to get access to options:
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
[[command-execution]]
12
=== Command Execution
23
When command parsing has done its job and command registration has been resolved, command execution
34
does the hard work of running the code.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
[[command-parser]]
12
=== Command Parser
23
Before a command can be executed, we need to parse the command and whatever options the user may have provided. Parsing
34
comes between command registration and command execution.

spring-shell-docs/modules/ROOT/pages/appendices-techical-intro-registration.adoc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Defining a command registration is a first step to introducing the structure of
66
and parameters. This is loosely decoupled from what happens later, such as parsing command-line input and running
77
actual target code. Essentially, it is the definition of a command API that is shown to a user.
88

9+
[[commands]]
910
==== Commands
1011
A command in a `spring-shell` structure is defined as an array of commands. This yields a
1112
structure similar to the following example:
@@ -23,6 +24,7 @@ command2 sub2 subsub2
2324
NOTE: We do not currently support mapping commands to an explicit parent if sub-commands are defined.
2425
For example, `command1 sub1` and `command1 sub1 subsub1` cannot both be registered.
2526

27+
[[interaction-mode]]
2628
==== Interaction Mode
2729
Spring Shell has been designed to work on two modes: interactive (which essentially
2830
is a `REPL` where you have an active shell instance throughout a series of commands) and
@@ -36,6 +38,7 @@ dictates the available information.
3638
Also, being on an active `REPL` session may provide more information about what the user has been
3739
doing within an active session.
3840

41+
[[options]]
3942
==== Options
4043
Options can be defined as long and short, where the prefixing is `--` and `-`, respectively.
4144
The following examples show long and short options:
@@ -54,10 +57,12 @@ include::{snippets}/CommandRegistrationSnippets.java[tag=snippet2]
5457
----
5558
====
5659

60+
[[target]]
5761
==== Target
5862
The target defines the execution target of a command. It can be a method in a POJO,
5963
a `Consumer`, or a `Function`.
6064

65+
[[method]]
6166
===== Method
6267
Using a `Method` in an existing POJO is one way to define a target.
6368
Consider the following class:
@@ -78,6 +83,7 @@ include::{snippets}/CommandTargetSnippets.java[tag=snippet12]
7883
----
7984
====
8085

86+
[[function]]
8187
===== Function
8288
Using a `Function` as a target gives a lot of flexibility to handle what
8389
happens in a command execution, because you can handle many things manually by using
@@ -91,6 +97,7 @@ include::{snippets}/CommandTargetSnippets.java[tag=snippet2]
9197
----
9298
====
9399

100+
[[consumer]]
94101
===== Consumer
95102
Using a `Consumer` is basically the same as using a `Function`, with the difference being
96103
that there is no return type. If you need to print something into a shell,

spring-shell-docs/modules/ROOT/pages/appendices-techical-intro-searchalgorithm.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ contains info about match positions and overall score of a match.
88

99
https://github.com/junegunn/fzf[fzf].
1010

11+
[[implementations]]
1112
==== Implementations
1213

1314
*FuzzyMatchV2Search*
@@ -20,6 +21,7 @@ quickly finding paths.
2021
Port of _fzf ExactMatchNaive_ algorithm. Simple exact match works more accurately
2122
if you know what to search.
2223

24+
[[searchmatch]]
2325
==== SearchMatch
2426

2527
Algorithms and default syntax are hidden inside package protected classes
@@ -55,6 +57,7 @@ below table.
5557
|Items that include `stuff`
5658
|===
5759

60+
[[examples]]
5861
==== Examples
5962

6063
====

spring-shell-docs/modules/ROOT/pages/appendices-tui-catalog.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ In this section we discuss how this application works. It can be considered to b
77
a reference application as it's using most of the features available and tries
88
to follow best practices.
99

10+
[[create-scenario]]
1011
==== Create Scenario
1112
Every `Scenario` essentially is a sample code of a `View` as that's what catalog
1213
app demonstrates.

spring-shell-docs/modules/ROOT/pages/getting-started.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1+
[[getting-started]]
12
== Getting Started
23
To see what Spring Shell has to offer, we can write a trivial _hello world_
34
shell application that has a simple argument.
45

56
IMPORTANT: _Spring Shell_ is based on _Spring Boot_ {spring-boot-version} and
67
_Spring Framework_ {spring-version} and thus requires _JDK 17_.
78

9+
[[creating-a-project]]
810
=== Creating a Project
911

1012
For the purpose of this tutorial, we create a simple Spring Boot application by

spring-shell-docs/modules/ROOT/pages/index.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
[[spring-shell-reference-documentation]]
12
= Spring Shell Reference Documentation
23
Eric Bottard; Janne Valkealahti; Jay Bryant; Corneil du Plessis
34
:doctype: book

spring-shell-docs/modules/ROOT/pages/introduction.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
[[what-is-spring-shell?]]
12
== What is Spring Shell?
23
Not all applications need a fancy web user interface.
34
Sometimes, interacting with an application through an interactive terminal is

spring-shell-docs/modules/ROOT/pages/using-shell-basics-reading.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ The programmatic model is how things are actually registered, even if you use an
1515

1616
NOTE: Currently whole documentation structure is in transit to provide better
1717
structure how things can be used using different ways to provide configurations.
18-
So pardon a for little confusion now and there during a transit.
18+
So pardon a for little confusion now and there during a transit.

spring-shell-docs/modules/ROOT/pages/using-shell-commands-exceptionhandling-annotation.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ include::{snippets}/ErrorHandlingSnippets.java[tag=exception-resolver-with-void]
5252
----
5353
====
5454

55+
[[method-arguments]]
5556
===== Method Arguments
5657
`@ExceptionResolver` methods support the following arguments:
5758

@@ -67,6 +68,7 @@ include::{snippets}/ErrorHandlingSnippets.java[tag=exception-resolver-with-void]
6768

6869
|===
6970

71+
[[return-values]]
7072
===== Return Values
7173
`@ExceptionResolver` methods support the following return values:
7274

spring-shell-docs/modules/ROOT/pages/using-shell-commands-registration.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
[[registration]]
12
=== Registration
23
ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs]
34

spring-shell-docs/modules/ROOT/pages/using-shell-commands-writing.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
[[writing]]
12
=== Writing
23
ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs]
34

spring-shell-docs/modules/ROOT/pages/using-shell-commands.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
[[commands]]
12
== Commands
23
ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs]
34

spring-shell-docs/modules/ROOT/pages/using-shell-completion.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
[[completion]]
12
== Completion
23
ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs]
34

@@ -8,6 +9,7 @@ easier to provide more programmatic ways to provide completion hints.
89
When shell is purely run as a command-line tool a completion can only
910
be accomplished with integration into OS level shell's like _bash_.
1011

12+
[[interactive]]
1113
=== Interactive
1214

1315
Hints for completions are calculated with _function_ or _interface_ style
@@ -58,6 +60,7 @@ include::{snippets}/CompletionSnippets.java[tag=anno-method]
5860
----
5961
====
6062

63+
[[command-line]]
6164
=== Command-Line
6265

6366
Command-line completion currently only support _bash_ and is documented

spring-shell-docs/modules/ROOT/pages/using-shell-options-types.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs]
44

55
This section talks about how particular data type is used as an option value.
66

7+
[[string]]
78
==== String
89

910
`String` is a most simplest type as there's no conversion involved as what's
@@ -26,6 +27,7 @@ include::{snippets}/OptionTypesSnippets.java[tag=option-type-string-reg]
2627
----
2728
====
2829

30+
[[boolean]]
2931
==== Boolean
3032

3133
Using boolean types is a bit more involved as there are `boolean` and
@@ -74,6 +76,7 @@ arg1=false arg2=true arg3=false arg4=false arg5=true arg6=false
7476
----
7577
====
7678

79+
[[number]]
7780
==== Number
7881

7982
Numbers are converted as is.
@@ -92,6 +95,7 @@ include::{snippets}/OptionTypesSnippets.java[tag=option-type-integer-reg]
9295
----
9396
====
9497

98+
[[enum]]
9599
==== Enum
96100

97101
Conversion to enums is possible if given value is exactly matching enum itself.
@@ -118,6 +122,7 @@ include::{snippets}/OptionTypesSnippets.java[tag=option-type-enum-reg]
118122
----
119123
====
120124

125+
[[array]]
121126
==== Array
122127

123128
Arrays can be used as is with strings and primitive types.

0 commit comments

Comments
 (0)