Skip to content

Commit ce65cf6

Browse files
committed
Fix indentation for all pages
1 parent 02964ae commit ce65cf6

File tree

85 files changed

+179
-112
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+179
-112
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[appendix]
22
[#appendix-debugging]
3-
== Debugging
3+
= Debugging
44

55
Please find more info about debugging from https://github.com/spring-projects/spring-shell/wiki/Debugging[project wiki].

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[[command-catalog]]
2-
=== Command Catalog
2+
= Command Catalog
3+
34
The `CommandCatalog` interface defines how command registrations exist in
45
a shell application. It is possible to dynamically register and de-register
56
commands, which gives flexibility for use cases where possible commands
@@ -13,7 +14,7 @@ include::{snippets}/CommandCatalogSnippets.java[tag=snippet1]
1314
====
1415

1516
[[command-resolver]]
16-
==== Command Resolver
17+
== Command Resolver
1718
You can implement the `CommandResolver` interface and define a bean to dynamically
1819
resolve mappings from a command's name to its `CommandRegistration` instances. Consider
1920
the following example:
@@ -30,7 +31,7 @@ Thus, we advise not using it if a command resolution call takes a long time, as
3031
make the shell feel sluggish.
3132

3233
[[command-catalog-customizer]]
33-
==== Command Catalog Customizer
34+
== Command Catalog Customizer
3435
You can use the `CommandCatalogCustomizer` interface to customize a `CommandCatalog`.
3536
Its main use is to modify a catalog. Also, within `spring-shell` auto-configuration, this
3637
interface is used to register existing `CommandRegistration` beans into a catalog.

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[[command-context]]
2-
=== Command Context
2+
= Command Context
3+
34
The `CommandContext` interface gives access to a currently running
45
context. You can use it to get access to options:
56

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[[command-execution]]
2-
=== Command Execution
2+
= Command Execution
3+
34
When command parsing has done its job and command registration has been resolved, command execution
45
does the hard work of running the code.
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[[command-parser]]
2-
=== Command Parser
2+
= Command Parser
3+
34
Before a command can be executed, we need to parse the command and whatever options the user may have provided. Parsing
45
comes between command registration and command execution.

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

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
[#appendix-tech-intro-registration]
2-
=== Command Registration
2+
= Command Registration
3+
34
ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs]
45

56
Defining a command registration is a first step to introducing the structure of a command and its options
67
and parameters. This is loosely decoupled from what happens later, such as parsing command-line input and running
78
actual target code. Essentially, it is the definition of a command API that is shown to a user.
89

910
[[commands]]
10-
==== Commands
11+
== Commands
1112
A command in a `spring-shell` structure is defined as an array of commands. This yields a
1213
structure similar to the following example:
1314

@@ -25,7 +26,7 @@ NOTE: We do not currently support mapping commands to an explicit parent if sub-
2526
For example, `command1 sub1` and `command1 sub1 subsub1` cannot both be registered.
2627

2728
[[interaction-mode]]
28-
==== Interaction Mode
29+
== Interaction Mode
2930
Spring Shell has been designed to work on two modes: interactive (which essentially
3031
is a `REPL` where you have an active shell instance throughout a series of commands) and
3132
non-interactive (where commands are executed one by one from a command line).
@@ -39,7 +40,7 @@ Also, being on an active `REPL` session may provide more information about what
3940
doing within an active session.
4041

4142
[[options]]
42-
==== Options
43+
== Options
4344
Options can be defined as long and short, where the prefixing is `--` and `-`, respectively.
4445
The following examples show long and short options:
4546

@@ -58,12 +59,12 @@ include::{snippets}/CommandRegistrationSnippets.java[tag=snippet2]
5859
====
5960

6061
[[target]]
61-
==== Target
62+
== Target
6263
The target defines the execution target of a command. It can be a method in a POJO,
6364
a `Consumer`, or a `Function`.
6465

6566
[[method]]
66-
===== Method
67+
=== Method
6768
Using a `Method` in an existing POJO is one way to define a target.
6869
Consider the following class:
6970

@@ -84,7 +85,7 @@ include::{snippets}/CommandTargetSnippets.java[tag=snippet12]
8485
====
8586

8687
[[function]]
87-
===== Function
88+
=== Function
8889
Using a `Function` as a target gives a lot of flexibility to handle what
8990
happens in a command execution, because you can handle many things manually by using
9091
a `CommandContext` given to a `Function`. The return type from a `Function` is
@@ -98,7 +99,7 @@ include::{snippets}/CommandTargetSnippets.java[tag=snippet2]
9899
====
99100

100101
[[consumer]]
101-
===== Consumer
102+
=== Consumer
102103
Using a `Consumer` is basically the same as using a `Function`, with the difference being
103104
that there is no return type. If you need to print something into a shell,
104105
you can get a reference to a `Terminal` from a context and print something

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[#appendix-tech-intro-searchalgorithm]
2-
=== Search Algorithms
2+
= Search Algorithms
3+
34
ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs]
45

56
`SearchMatch` is an interface to match _text_ with a _pattern_. Match
@@ -9,7 +10,7 @@ contains info about match positions and overall score of a match.
910
https://github.com/junegunn/fzf[fzf].
1011

1112
[[implementations]]
12-
==== Implementations
13+
== Implementations
1314

1415
*FuzzyMatchV2Search*
1516

@@ -22,7 +23,7 @@ Port of _fzf ExactMatchNaive_ algorithm. Simple exact match works more accuratel
2223
if you know what to search.
2324

2425
[[searchmatch]]
25-
==== SearchMatch
26+
== SearchMatch
2627

2728
Algorithms and default syntax are hidden inside package protected classes
2829
as we don't want to fully open these until we know API's are good to go
@@ -58,7 +59,7 @@ below table.
5859
|===
5960

6061
[[examples]]
61-
==== Examples
62+
== Examples
6263

6364
====
6465
[source, java, indent=0]

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[#appendix-tech-intro-theming]
2-
=== Theming
2+
= Theming
3+
34
ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs]
45

56
Styling in a theming is provided by a use of a _AttributedString_ from `JLine`.

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[appendix]
22
[#appendix-tech-intro]
3-
== Techical Introduction
3+
= Techical Introduction
4+
45
This appendix contains information for developers and others who would like to know more about how Spring Shell
56
works internally and what its design decisions are.
67

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[#appendix-tui-catalog]
2-
=== Catalog App
2+
= Catalog App
3+
34
ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs]
45

56
Catalog application is showing various ways how Terminal UI Framework can be used.
@@ -8,6 +9,6 @@ a reference application as it's using most of the features available and tries
89
to follow best practices.
910

1011
[[create-scenario]]
11-
==== Create Scenario
12+
== Create Scenario
1213
Every `Scenario` essentially is a sample code of a `View` as that's what catalog
1314
app demonstrates.
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[#appendix-tui-control]
2-
=== Control
2+
= Control
3+
34
ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs]
45

56
_Control_ draws something into a screen with a given bounds.
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[#appendix-tui-eventloop]
2-
=== EventLoop
2+
= EventLoop
3+
34
ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs]
45

56
_EventLoop_ is a central system handling eventing in a framework.
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[#appendix-tui-keyhandling]
2-
=== Key Handling
2+
= Key Handling
3+
34
ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs]
45

56
Handles incoming key events.
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[#appendix-tui-mousehandling]
2-
=== Mouse Handling
2+
= Mouse Handling
3+
34
ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs]
45

56
Handles incoming mouse events.

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[#appendix-tui-screen]
2-
=== Screen
2+
= Screen
3+
34
ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs]
45

56
_Screen_ is an abstraction providing higher level concept to draw something
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[#appendix-tui-view]
2-
=== View
2+
= View
3+
34
ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs]
45

56
_View_ extends _Control_ providing integration into event loop.

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[appendix]
22
[#appendix-tech-intro-tui]
3-
== Terminal UI
3+
= Terminal UI
4+
45
ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs]
56

67
This is a technical introduction to _UI Framework_.

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

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

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

910
[[creating-a-project]]
10-
=== Creating a Project
11+
== Creating a Project
1112

1213
For the purpose of this tutorial, we create a simple Spring Boot application by
1314
using https://start.spring.io where you can choose _Spring Shell_ dependency.
@@ -98,7 +99,7 @@ TIP: Check out <<using-shell-customization-logging>> making logging to work
9899
better with shell apps.
99100

100101
[[using-spring-shell-your-first-command]]
101-
=== Your First Command
102+
== Your First Command
102103

103104
Now we can add our first command. To do so, create a new class (named whatever you want) and
104105
annotate it with `@ShellComponent` which is a variation of `@Component` that is used to restrict

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[[what-is-spring-shell?]]
2-
== What is Spring Shell?
2+
= What is Spring Shell?
3+
34
Not all applications need a fancy web user interface.
45
Sometimes, interacting with an application through an interactive terminal is
56
the most appropriate way to get things done.

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
@@ -1,5 +1,5 @@
11
[[using-shell-basics-reading]]
2-
=== Reading Docs
2+
= Reading Docs
33

44
Throughout this documentation, we make references to configuring something by using
55
annotations or programmatic examples.

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[[using-shell-basics]]
2-
== Basics
2+
= Basics
3+
34
This section covers the basics of Spring Shell. Before going on to define actual commands and options,
45
we need to go through some of the fundamental concepts of Spring Shell.
56

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[[using-shell-building]]
2-
== Building
2+
= Building
33

44
This section covers how to build a Spring Shell application.
55

66
[[native]]
7-
=== Native Support
7+
== Native Support
88

99
Support for compiling _Spring Shell_ application into a _GraalVM_ binary
1010
mostly comes from _Spring Framework_ and _Spring Boot_ where feature is

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[[dynamic-command-availability]]
2-
=== Dynamic Command Availability
2+
= Dynamic Command Availability
33

44
Registered commands do not always make sense, due to the internal state of the application.
55
For example, there may be a `download` command, but it only works once the user has used `connect` on a remote
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[[built-in-commands-clear]]
2-
==== Clear
2+
= Clear
3+
34
The `clear` command does what you would expect and clears the screen, resetting the prompt
45
in the top left corner.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[[built-in-commands-completion]]
2-
==== Completion
2+
= Completion
33

44
The `completion` command set lets you create script files that can be used
55
with am OS shell implementations to provide completion. This is very useful when

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[[built-in-commands-exit]]
2-
==== Exit
2+
= Exit
33

44
The `quit` command (also aliased as `exit`) requests the shell to quit, gracefully
55
closing the Spring application context. If not overridden, a JLine `History` bean writes a history of all

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[[built-in-commands-help]]
2-
==== Help
2+
= Help
33

44
Running a shell application often implies that the user is in a graphically limited
55
environment. Also, while we are nearly always connected in the era of mobile phones,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[[built-in-commands-history]]
2-
==== History
2+
= History
33

44
The `history` command shows the history of commands that has been executed.
55

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[[built-in-commands-script]]
2-
==== Script
2+
= Script
33

44
The `script` command accepts a local file as an argument and replays commands found there, one at a time.
55

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[[built-in-commands-stacktrace]]
2-
==== Stacktrace
2+
= Stacktrace
33

44
When an exception occurs inside command code, it is caught by the shell and a simple, one-line message is displayed
55
so as not to overflow the user with too much information.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[[built-in-commands-version]]
2-
==== Version
2+
= Version
33

44
The `version` command shows existing build and git info by integrating into
55
Boot's `BuildProperties` and `GitProperties` if those exist in the shell application.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[[built-in-commands]]
2-
=== Built-In Commands
2+
= Built-In Commands
33

44
include::using-shell-commands-builtin-help.adoc[]
55

0 commit comments

Comments
 (0)