Migrate docs to antora

- This is basically copy from main branch minus all
  terminal ui things.
- Relates #971
This commit is contained in:
Janne Valkealahti
2024-01-12 14:02:10 +00:00
parent 09d4bfed51
commit 814ed4958f
108 changed files with 637 additions and 1037 deletions

View File

@@ -0,0 +1,21 @@
[[command-context]]
= Command Context
:page-section-summary-toc: 1
ifndef::snippets[:snippets: ../../../../../src/test/java/org/springframework/shell/docs]
The `CommandContext` interface gives access to a currently running
context. You can use it to get access to options:
[source, java, indent=0]
----
include::{snippets}/CommandContextSnippets.java[tag=snippet1]
----
If you need to print something into a shell, you can get a `Terminal`
and use its writer to print something:
[source, java, indent=0]
----
include::{snippets}/CommandContextSnippets.java[tag=snippet2]
----