Skip to content

Commit 6fd1a1c

Browse files
committed
Add primary command docs
- Relates #755
1 parent 32675c5 commit 6fd1a1c

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[[using-shell-customization-singlecommand]]
2+
=== Single Command
3+
ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs]
4+
5+
If your shell application is made for exactly a single purpose having only one
6+
command it may be beneficial to configure it for this. Property
7+
`spring.shell.noninteractive.primary-command` if defined will disable all other
8+
runners than `NonInteractiveShellRunner` and configures it to use
9+
defined _Primary Command_.
10+
11+
====
12+
[source, yaml]
13+
----
14+
spring:
15+
shell:
16+
noninteractive:
17+
primary-command: mycommand
18+
----
19+
====
20+
21+
For example if you have a command `mycommand` with option `arg`
22+
it had to be executed with `<shellapp> mycommand --arg hi`, but with above
23+
setting it can be executed with `<shellapp> --arg hi`.

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

+2
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ include::using-shell-customization-styling.adoc[]
88
include::using-shell-customization-logging.adoc[]
99

1010
include::using-shell-customization-commandnotfound.adoc[]
11+
12+
include::using-shell-customization-singlecommand.adoc[]

0 commit comments

Comments
 (0)