Skip to content

Commit e73578d

Browse files
authored
Update documentation cross-links (#383)
1 parent 3bbfafe commit e73578d

File tree

5 files changed

+10
-24
lines changed

5 files changed

+10
-24
lines changed

Sources/ArgumentParser/Documentation.docc/ArgumentParser.md

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -37,26 +37,12 @@ the `ArgumentParser` library parses the command-line arguments,
3737
instantiates your command type,
3838
and then either calls your `run()` method or exits with a useful message.
3939

40-
```
41-
$ repeat hello --count 3
42-
hello
43-
hello
44-
hello
45-
$ repeat --help
46-
USAGE: repeat [--count <count>] <phrase>
47-
48-
ARGUMENTS:
49-
<phrase> The phrase to repeat.
50-
51-
OPTIONS:
52-
--count <count> The number of times to repeat 'phrase'.
53-
-h, --help Show help for this command.
54-
$ repeat --count 3
55-
Error: Missing expected argument 'phrase'.
56-
Help: <phrase> The phrase to repeat.
57-
Usage: repeat [--count <count>] <phrase>
58-
See 'repeat --help' for more information.
59-
```
40+
![The output of the Repeat command, declared above.](repeat.png)
41+
42+
#### Additional Resources
43+
44+
- [`ArgumentParser` on GitHub](https://github.com/apple/swift-argument-parser/)
45+
- [`ArgumentParser` on the Swift Forums](https://forums.swift.org/c/related-projects/argumentparser/60)
6046

6147
## Topics
6248

Sources/ArgumentParser/Documentation.docc/Articles/CustomizingHelp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ OPTIONS:
7676

7777
## Customizing Help for Commands
7878

79-
In addition to configuring the command name and subcommands, as described in [Command and Subcommands](./CommandsAndSubcommands.md), you can also configure a command's help text by providing an abstract and discussion.
79+
In addition to configuring the command name and subcommands, as described in <doc:CommandsAndSubcommands>, you can also configure a command's help text by providing an abstract and discussion.
8080

8181
```swift
8282
struct Repeat: ParsableCommand {

Sources/ArgumentParser/Documentation.docc/Articles/DeclaringArguments.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ struct Example: ParsableCommand {
199199
}
200200
```
201201

202-
Throw an error from the `transform` function to indicate that the user provided an invalid value for that type. See [Handling Transform Errors](./Validation.md#handling-transform-errors) for more about customizing `transform` function errors.
202+
Throw an error from the `transform` function to indicate that the user provided an invalid value for that type. See <doc:Validation> for more about customizing `transform` function errors.
203203

204204
## Using flag inversions, enumerations, and counts
205205

@@ -255,7 +255,7 @@ struct Example: ParsableCommand {
255255
}
256256
```
257257

258-
The flag names in this case are drawn from the raw values — for information about customizing the names and help text, see the [`EnumerableFlag` documentation](../../Parsable%20Types/EnumerableFlag.swift).
258+
The flag names in this case are drawn from the raw values — for information about customizing the names and help text, see the ``EnumerableFlag`` documentation.
259259

260260
```
261261
% example --in-memory-cache --pink --silver

Sources/ArgumentParser/Documentation.docc/Articles/ManualParsing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ For most programs, calling the static `main()` method on the root command type i
1010

1111
For simple Swift scripts, and for those who prefer a straight-down-the-left-edge-of-the-screen scripting style, you can define a single `ParsableArguments` type to parse explicitly from the command-line arguments.
1212

13-
Let's implement the `Select` command discussed in [Validation and Errors](./Validation.md), but using a scripty style instead of the typical command. First, we define the options as a `ParsableArguments` type:
13+
Let's implement the `Select` command discussed in <doc:Validation>, but using a scripty style instead of the typical command. First, we define the options as a `ParsableArguments` type:
1414

1515
```swift
1616
struct SelectOptions: ParsableArguments {
451 KB
Loading

0 commit comments

Comments
 (0)