mirror of
https://github.com/jlengrand/picocli.git
synced 2026-03-10 08:41:17 +00:00
[#454] DOC improved diagram colors
This commit is contained in:
@@ -23,7 +23,7 @@ Picocli follows [semantic versioning](http://semver.org/).
|
||||
* [New and noteworthy](#4.2.0-new)
|
||||
* [Repeatable Subcommands](#4.2.0-repeatable-subcommands)
|
||||
* [Inject `CommandSpec` into a `IVersionProvider`](#4.2.0-versionprovider-with-spec)
|
||||
* [Lazily instantiate subcommands](#4.2.0-lazy-instantiation)
|
||||
* [Subcommands are now lazily instantiated](#4.2.0-lazy-instantiation)
|
||||
* [Mixins with `@ParentCommand`-annotated fields](#4.2.0-mixins)
|
||||
* [Showing `@filename` in usage help](#4.2.0-atfiles-usage)
|
||||
* [Fixed issues](#4.2.0-fixes)
|
||||
@@ -74,7 +74,7 @@ This invocation is valid because `myapp` is marked with `subcommandsRepeatable =
|
||||
#### Repeatable Subcommands Specification
|
||||
|
||||
Normally, `subcommandsRepeatable` is `false`, so for each command, only one of its subcommands can be specified, potentially followed by only one sub-subcommand of that subcommand, etc.
|
||||
In mathematical terms, a valid sequence of commands and subcommands can be represented by a _directed rooted tree_ that starts at the top-level command, illustrated by the diagram below.
|
||||
In mathematical terms, a valid sequence of commands and subcommands can be represented by a _directed rooted tree_ that starts at the top-level command. This is illustrated by the diagram below.
|
||||
|
||||

|
||||
|
||||
@@ -83,7 +83,7 @@ Also, a subcommand can be followed by a "sibling" command (another command with
|
||||
|
||||
In mathematical terms, when a parent command has this property, the additional valid sequences of its subcommands form a fully connected subgraph (_a complete digraph_).
|
||||
|
||||
The blue dotted arrows in the diagram below illustrate the additional sequences that are allowed when a command has repeatable subcommands.
|
||||
The blue and green dotted arrows in the diagram below illustrate the additional sequences that are allowed when a command has repeatable subcommands.
|
||||
|
||||

|
||||
|
||||
@@ -95,6 +95,11 @@ Note that it is not valid to specify a subcommand followed by its parent command
|
||||
myapp add -x=item1 -w=0.2 myapp
|
||||
```
|
||||
|
||||
### <a name="4.2.0-lazy-instantiation"></a> Subcommands are now lazily instantiated
|
||||
|
||||
From this release, subcommands are not instantiated until they are matched on the command line,
|
||||
unless the user object has a `@Spec` or `@ParentObject`-annotated field; these are instantiated during initialization.
|
||||
|
||||
|
||||
### <a name="4.2.0-versionprovider-with-spec"></a> Injecting `CommandSpec` Into a `IVersionProvider`
|
||||
|
||||
@@ -115,11 +120,6 @@ class MyVersionProvider implements IVersionProvider {
|
||||
}
|
||||
```
|
||||
|
||||
### <a name="4.2.0-lazy-instantiation"></a> Lazily instantiate subcommands
|
||||
|
||||
From this release, subcommands are not instantiated until they are matched on the command line,
|
||||
unless the user object has a `@Spec` or `@ParentObject`-annotated field; these are instantiated during initialization.
|
||||
|
||||
### <a name="4.2.0-mixins"></a> Mixins with `@ParentCommand`-annotated fields
|
||||
|
||||
TODO
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
@@ -4086,7 +4086,7 @@ This invocation is valid because `myapp` is marked with `subcommandsRepeatable =
|
||||
==== Repeatable Subcommands Specification
|
||||
|
||||
Normally, `subcommandsRepeatable` is `false`, so for each command, only one of its subcommands can be specified, potentially followed by only one sub-subcommand of that subcommand, etc.
|
||||
In mathematical terms, a valid sequence of commands and subcommands can be represented by a _directed rooted tree_ that starts at the top-level command, illustrated by the diagram below.
|
||||
In mathematical terms, a valid sequence of commands and subcommands can be represented by a _directed rooted tree_ that starts at the top-level command. This is illustrated by the diagram below.
|
||||
|
||||
[#sequences-when-subcommands-not-repeatable]
|
||||
.By default, valid sequences of commands and subcommands form a directed rooted tree.
|
||||
@@ -4097,7 +4097,7 @@ Also, a subcommand can be followed by a "sibling" command (another command with
|
||||
|
||||
In mathematical terms, when a parent command has this property, the additional valid sequences of its subcommands form a fully connected subgraph (_a complete digraph_).
|
||||
|
||||
The blue dotted arrows in the diagram below illustrate the additional sequences that are allowed when a command has repeatable subcommands.
|
||||
The blue and green dotted arrows in the diagram below illustrate the additional sequences that are allowed when a command has repeatable subcommands.
|
||||
|
||||
[#sequences-when-subcommands-repeatable]
|
||||
.If a command is marked to allow repeatable subcommands, the additional valid sequences of its subcommands form a fully connected subgraph.
|
||||
|
||||
Reference in New Issue
Block a user