Skip to content

Commit 5577fa9

Browse files
committed
docs(website): add previous excluded API examples
1 parent 086b915 commit 5577fa9

3 files changed

Lines changed: 17 additions & 5 deletions

File tree

docs/src/content/docs/reference/api/arg/long_help.mdx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,15 @@ Sets the description of the argument for long help (`--help`).
2424
<TabItem label="TOML">
2525
```toml
2626
name = "prog"
27+
term-width = 80
2728
[args]
2829
cfg = { long = "config", long-help = "The config file used by the myprog must be in JSON format with only valid keys and may not contain other nonsense that cannot be read by this program. Obviously I'm going on and on, so I'll stop now." }
2930
```
3031
</TabItem>
3132
<TabItem label="YAML">
3233
```yaml
3334
name: prog
35+
term-width: 80
3436
args:
3537
cfg:
3638
long: config
@@ -41,6 +43,7 @@ args:
4143
```json
4244
{
4345
"name": "prog",
46+
"term-width": 80,
4447
"args": {
4548
"cfg": {
4649
"long": "config",
@@ -65,8 +68,9 @@ Usage: prog [OPTIONS]
6568

6669
Options:
6770
--config <cfg>
68-
The config file used by the myprog must be in JSON format with only valid keys and may not contain other nonsense that cannot be read by this program.
69-
Obviously I'm going on and on, so I'll stop now.
71+
The config file used by the myprog must be in JSON format with only
72+
valid keys and may not contain other nonsense that cannot be read by
73+
this program. Obviously I'm going on and on, so I'll stop now.
7074

7175
-h, --help
7276
Print help (see a summary with '-h')

docs/src/content/docs/reference/api/command/after_long_help.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,15 @@ Free-form help text for after auto-generated long help (`--help`).
2424
<TabItem label="TOML">
2525
```toml
2626
name = "myprog"
27+
term-width = 80
2728
after-long-help = "Does really amazing things to great people... but be careful with -R, like, for real, be careful with this!"
2829
[args]
2930
```
3031
</TabItem>
3132
<TabItem label="YAML">
3233
```yaml
3334
name: myprog
35+
term-width: 80
3436
after-long-help: Does really amazing things to great people... but be careful with -R, like, for real, be careful with this!
3537
args: {}
3638
```
@@ -39,6 +41,7 @@ args: {}
3941
```json
4042
{
4143
"name": "myprog",
44+
"term-width": 80,
4245
"after-long-help": "Does really amazing things to great people... but be careful with -R, like, for real, be careful with this!",
4346
"args": {}
4447
}
@@ -61,5 +64,6 @@ Options:
6164
-h, --help
6265
Print help (see a summary with '-h')
6366

64-
Does really amazing things to great people... but be careful with -R, like, for real, be careful with this!
67+
Does really amazing things to great people... but be careful with -R, like, for
68+
real, be careful with this!
6569
```

docs/src/content/docs/reference/api/command/long_about.mdx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,15 @@ Sets the program’s description for the long help (`--help`).
2424
<TabItem label="TOML">
2525
```toml
2626
name = "myprog"
27+
term-width = 80
2728
long-about = "Does really amazing things to great people. Now let's talk a little more in depth about how this subcommand really works. It may take about a few lines of text, but that's ok!"
2829
[args]
2930
```
3031
</TabItem>
3132
<TabItem label="YAML">
3233
```yaml
3334
name: myprog
35+
term-width: 80
3436
long-about: Does really amazing things to great people. Now let's talk a little more in depth about how this subcommand really works. It may take about a few lines of text, but that's ok!
3537
args: {}
3638
```
@@ -39,6 +41,7 @@ args: {}
3941
```json
4042
{
4143
"name": "myprog",
44+
"term-width": 80,
4245
"long-about": "Does really amazing things to great people. Now let's talk a little more in depth about how this subcommand really works. It may take about a few lines of text, but that's ok!",
4346
"args": {}
4447
}
@@ -55,8 +58,9 @@ myprog --help
5558
### Output
5659

5760
```bash
58-
Does really amazing things to great people. Now let's talk a little more in depth about how this subcommand really works. It may take about a few lines of text,
59-
but that's ok!
61+
Does really amazing things to great people. Now let's talk a little more in
62+
depth about how this subcommand really works. It may take about a few lines of
63+
text, but that's ok!
6064

6165
Usage: myprog
6266

0 commit comments

Comments
 (0)