Skip to content

Commit 7575a77

Browse files
committed
doc: use markdown style examples in commandline doc
1 parent c83d93e commit 7575a77

File tree

1 file changed

+31
-18
lines changed

1 file changed

+31
-18
lines changed

src/robotcode/cli/commands/config.py

Lines changed: 31 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,16 @@ def show(
4747
"""\
4848
Shows the Robot Framework configuration.
4949
50-
Takes a list of PATHS or if no paths are given, takes the current working directory,
50+
Takes a list of PATHS or if no PATHS are given, takes the current working directory,
5151
to search for configuration files and prints the current configuration.
5252
5353
\b
5454
Examples:
55-
robotcode config show
56-
robotcode config show tests/acceptance/first.robot
57-
robotcode config show --format json
55+
```
56+
robotcode config show
57+
robotcode config show tests/acceptance/first.robot
58+
robotcode config show --format json
59+
```
5860
"""
5961

6062
config_files, _, _ = get_config_files(paths, app.config.config_files, verbose_callback=app.verbose)
@@ -88,13 +90,16 @@ def files(
8890
"""\
8991
Shows Robot Framework configuration files.
9092
91-
Takes a list of PATHS or if no paths are given, takes the current working directory,
93+
Takes a list of PATHS or if no PATHS are given, takes the current working directory,
9294
to search for configuration files and prints them.
9395
9496
\b
9597
Examples:
96-
robotcode config files
97-
robotcode config files tests/acceptance/first.robot
98+
99+
```
100+
robotcode config files
101+
robotcode config files tests/acceptance/first.robot
102+
```
98103
"""
99104

100105
try:
@@ -119,13 +124,16 @@ def root(
119124
"""\
120125
Shows the root of the Robot Framework project.
121126
122-
Takes a list of PATHS or if no paths are given, takes the current working directory,
127+
Takes a list of PATHS or if no PATHS are given, takes the current working directory,
123128
to search for the root of the project and prints this.
124129
125130
\b
126131
Examples:
127-
robotcode config root
128-
robotcode config root tests/acceptance/first.robot
132+
133+
```
134+
robotcode config root
135+
robotcode config root tests/acceptance/first.robot
136+
```
129137
"""
130138

131139
root_folder, discovered_by = find_project_root(*(paths or []))
@@ -189,9 +197,12 @@ def list(app: Application, name: Optional[List[str]] = None) -> Union[str, int,
189197
190198
\b
191199
Examples:
192-
robotcode config info list
193-
robotcode config info list rebot.*
194-
robotcode config info list *tag*
200+
201+
```
202+
robotcode config info list
203+
robotcode config info list rebot.*
204+
robotcode config info list *tag*
205+
```
195206
"""
196207
if not name:
197208
name = ["*"]
@@ -213,16 +224,18 @@ def desc(app: Application, name: Optional[List[str]] = None) -> Union[str, int,
213224
"""\
214225
Shows the description of the specified configuration settings.
215226
216-
If no NAME is gibven shows the description of all possible configuration settings.
227+
If no NAME is given shows the description of all possible configuration settings.
217228
Wildcards are supported.
218229
219230
\b
220231
Examples:
221-
robotcode config info desc
222-
robotcode config info desc python-path
223-
robotcode config info desc rebot.*
224-
robotcode config info desc *tag*
225232
233+
```
234+
robotcode config info desc
235+
robotcode config info desc python-path
236+
robotcode config info desc rebot.*
237+
robotcode config info desc *tag*
238+
```
226239
"""
227240
if not name:
228241
name = ["*"]

0 commit comments

Comments
 (0)