Skip to content

Commit 03a02a0

Browse files
committed
Flatten docs structure
- Essentially remove "Using Spring Shell" and move its content one level up. - Fixes #433
1 parent 32f77c1 commit 03a02a0

32 files changed

+50
-53
lines changed

spring-shell-docs/src/main/asciidoc/introduction.adoc

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@ The Spring Shell project provides the infrastructure to create such a REPL (Read
99
Print Loop) application, letting you concentrate on implementing commands by using
1010
the familiar Spring programming model.
1111

12-
Spring Shell includes advanced features (such as parsing, tab completion, colorization of
12+
Spring Shell includes advanced features (such as parsing, tab completion, colorization of
1313
output, fancy ASCII-art table display, input conversion, and validation), freeing you
1414
to focus on core command logic.
15+
16+
[IMPORTANT]
17+
====
18+
Spring Shell 2.1.x is a major rework to bring the codebase up to date with
19+
existing Spring Boot versions, adding new features and, especially,
20+
making it work with GraalVM which makes command-line applications much
21+
more relevant in a Java space. Moving to a new major version also lets
22+
us clean up the codebase and make some needed breaking changes.
23+
====

spring-shell-docs/src/main/asciidoc/using-shell-basics.adoc

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

spring-shell-docs/src/main/asciidoc/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
Version 2.1.x includes experimental support for compiling Spring Shell applications
1010
into native applications with GraalVM and Spring Native. Because the underlying JLine

spring-shell-docs/src/main/asciidoc/using-shell-commands-annotationmodel.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
==== Annotation Model
1+
=== Annotation Model
22
ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs]
33

44
When you use the standard API, methods on beans are turned into executable commands, provided that:

spring-shell-docs/src/main/asciidoc/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

spring-shell-docs/src/main/asciidoc/using-shell-commands-exitcode.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[[dynamic-command-exitcode]]
2-
==== Exit Code
2+
=== Exit Code
33
ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs]
44

55
Many command line applications when applicable return an _exit code_ which running environment

spring-shell-docs/src/main/asciidoc/using-shell-commands-organize.adoc

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

44
When your shell starts to provide a lot of functionality, you may end up
55
with a lot of commands, which could be confusing for your users. By typing `help`,

spring-shell-docs/src/main/asciidoc/using-shell-commands-programmaticmodel.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
==== Programmatic Model
1+
=== Programmatic Model
22
ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs]
33

44
In the programmatic model, `CommandRegistration` is defined as a `@Bean`, and it is automatically registered:

spring-shell-docs/src/main/asciidoc/using-shell-commands.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
=== Commands
1+
== Commands
22
ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs]
33

44
In this section, we go through an actual command registration and leave command options

spring-shell-docs/src/main/asciidoc/using-shell-components-builtin.adoc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[[built-in-commands]]
2-
==== Built-In Commands
2+
=== Built-In Commands
33

44
[[help-command]]
5-
===== Help
5+
==== Help
66

77
Running a shell application often implies that the user is in a graphically limited
88
environment. Also, while we are nearly always connected in the era of mobile phones,
@@ -79,17 +79,17 @@ script: Read and execute commands from a file.
7979
----
8080
====
8181

82-
===== Clear
82+
==== Clear
8383
The `clear` command does what you would expect and clears the screen, resetting the prompt
8484
in the top left corner.
8585

86-
===== Exit
86+
==== Exit
8787

8888
The `quit` command (also aliased as `exit`) requests the shell to quit, gracefully
8989
closing the Spring application context. If not overridden, a JLine `History` bean writes a history of all
9090
commands to disk, so that they are available again on the next launch.
9191

92-
===== Stacktrace
92+
==== Stacktrace
9393

9494
When an exception occurs inside command code, it is caught by the shell and a simple, one-line message is displayed
9595
so as not to overflow the user with too much information.
@@ -99,14 +99,14 @@ To this end, Spring Shell remembers the last exception that occurred, and the us
9999
command to print all the details on the console.
100100

101101
[[script-command]]
102-
===== Script
102+
==== Script
103103

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

106106
Reading from the file behaves exactly like inside the interactive shell, so lines starting with `//` are considered
107107
to be comments and are ignored, while lines ending with `\` trigger line continuation.
108108

109-
===== History
109+
==== History
110110

111111
The `history` command shows the history of commands that has been executed.
112112

@@ -122,15 +122,15 @@ a placeholder (`{userconfig}`), which resolves to a common shared config directo
122122

123123
TIP: Run the Spring Shell application to see how the sample application works as it uses these options.
124124

125-
===== Completion
125+
==== Completion
126126

127127
The `completion` command set lets you create script files that can be used
128128
with am OS shell implementations to provide completion. This is very useful when
129129
working with non-interactive mode.
130130

131131
Currently, the only implementation is for bash, which works with `bash` sub-command.
132132

133-
===== Version
133+
==== Version
134134

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

spring-shell-docs/src/main/asciidoc/using-shell-components-flow.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[[using-shell-components-flow]]
2-
==== Flow
2+
=== Flow
33
ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs]
44

55
When you use <<using-shell-components-ui>> to build something that involves

spring-shell-docs/src/main/asciidoc/using-shell-components-ui-confirmation.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[[using-shell-components-ui-confirmation]]
2-
===== Confirmation
2+
==== Confirmation
33
ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs]
44

55
The confirmation component asks a user for a simple confirmation. It is essentially a

spring-shell-docs/src/main/asciidoc/using-shell-components-ui-multiselect.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[[using-shell-components-ui-multiselect]]
2-
===== Multi Select
2+
==== Multi Select
33
ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs]
44

55
The multi select component asks a user to select multiple items from a list.

spring-shell-docs/src/main/asciidoc/using-shell-components-ui-pathinput.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[[using-shell-components-ui-pathinput]]
2-
===== Path Input
2+
==== Path Input
33
ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs]
44

55
The path input component asks a user for a `Path` and gives additional information about a path itself.

spring-shell-docs/src/main/asciidoc/using-shell-components-ui-render.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[[using-shell-components-ui-render]]
2-
===== Component Render
2+
==== Component Render
33
ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs]
44

55
You can implement component rendering in either of two ways: fully

spring-shell-docs/src/main/asciidoc/using-shell-components-ui-singleselect.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[[using-shell-components-ui-singleselect]]
2-
===== Single Select
2+
==== Single Select
33
ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs]
44

55
A single select component asks a user to choose one item from a list. It is similar to a simple

spring-shell-docs/src/main/asciidoc/using-shell-components-ui-stringinput.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[[using-shell-components-ui-stringinput]]
2-
===== String Input
2+
==== String Input
33
ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs]
44

55
The string input component asks a user for simple text input, optionally masking values

spring-shell-docs/src/main/asciidoc/using-shell-components-ui.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[[using-shell-components-ui]]
2-
==== Flow Components
2+
=== Flow Components
33
ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs]
44

55
Starting from version 2.1.x, a new component model provides an

spring-shell-docs/src/main/asciidoc/using-shell-components.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[[using-shell-components]]
2-
=== Components
2+
== Components
33

44
Components are a set of features which are either build-in or something
55
you can re-use or extend for your own needs. Components in question are

spring-shell-docs/src/main/asciidoc/using-shell-customization-styling.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[[theming]]
2-
==== Theming
2+
=== Theming
33
ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs]
44

55
Current terminal implementations are rich in features and can usually show

spring-shell-docs/src/main/asciidoc/using-shell-customization.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[[using-shell-customization]]
2-
=== Customization
2+
== Customization
33

44
This section describes how you can customize the shell.
55

spring-shell-docs/src/main/asciidoc/using-shell-execution.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
=== Execution
1+
== Execution
22

33
This section describes how to set up a Spring Shell to work in interactive mode.
44

5-
==== Interaction Mode
5+
=== Interaction Mode
66

77
Version 2.1.x introduced built-in support to distinguish between interactive
88
and non-interactive modes. This makes it easier to use the shell as a

spring-shell-docs/src/main/asciidoc/using-shell-options-arity.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[[using-shell-options-arity]]
2-
==== Arity
2+
=== Arity
33
ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs]
44

55
Sometimes, you want to have more fine control of how many parameters with an option

spring-shell-docs/src/main/asciidoc/using-shell-options-default.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[[using-shell-options-default]]
2-
==== Default Value
2+
=== Default Value
33
ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs]
44

55
Having a default value for an option is somewhat related to

spring-shell-docs/src/main/asciidoc/using-shell-options-definition.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[[using-shell-options-definition]]
2-
==== Definition
2+
=== Definition
33
ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs]
44

55
Options can be defined within a target method as annotations in a method arguments

spring-shell-docs/src/main/asciidoc/using-shell-options-label.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[[using-shell-options-label]]
2-
==== Label
2+
=== Label
33
ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs]
44

55
_Option Label_ has no functional behaviour within a shell itself other than

spring-shell-docs/src/main/asciidoc/using-shell-options-optional.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[[using-shell-options-optional]]
2-
==== Optional Value
2+
=== Optional Value
33
ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs]
44

55
An option is either required or not and, generally speaking, how it behavesit depends on

spring-shell-docs/src/main/asciidoc/using-shell-options-positional.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[[using-shell-options-positional]]
2-
==== Positional
2+
=== Positional
33
ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs]
44

55
Positional information is mostly related to a command target method:

spring-shell-docs/src/main/asciidoc/using-shell-options-short.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[[using-shell-options-short]]
2-
==== Short Format
2+
=== Short Format
33
ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs]
44

55
Short style _POSIX_ option in most is just a synonym to long format but

spring-shell-docs/src/main/asciidoc/using-shell-options-validation.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[[validating-command-arguments]]
2-
==== Validation
2+
=== Validation
33

44
Spring Shell integrates with the https://beanvalidation.org/[Bean Validation API] to support
55
automatic and self-documenting constraints on command parameters.

spring-shell-docs/src/main/asciidoc/using-shell-options.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[[using-shell-options]]
2-
=== Options
2+
== Options
33
ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs]
44

55
Command line arguments can be separated into options and positional parameters.

spring-shell-docs/src/main/asciidoc/using-shell.adoc

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,3 @@
1-
== Using Spring Shell
2-
This section describes how to use Spring Shell.
3-
4-
[IMPORTANT]
5-
====
6-
Spring Shell 2.1.x is a major rework to bring the codebase up to date with
7-
existing Spring Boot versions, adding new features and, especially,
8-
making it work with GraalVM which makes command-line applications much
9-
more relevant in a Java space. Moving to a new major version also lets
10-
us clean up the codebase and make some needed breaking changes.
11-
====
12-
131
include::using-shell-basics.adoc[]
142

153
include::using-shell-commands.adoc[]

0 commit comments

Comments
 (0)