Debian Codegraph @

debian/missing-sources/clap/examples/typed-derive/custom.md

raw symbols SCIP
1 Help:
2 ```console
3 $ typed-derive custom --help
4 Usage: typed-derive custom [OPTIONS]
5
6 Options:
7 --target-version <TARGET_VERSION>
8 Hand-implement `TypedValueParser`
9
10 Possible values:
11 - major: Increase the major version (x.0.0)
12 - minor: Increase the minor version (x.y.0)
13 - patch: Increase the patch version (x.y.z)
14
15 -h, --help
16 Print help (see a summary with '-h')
17
18 ```
19
20 Defines (key-value pairs)
21 ```console
22 $ typed-derive custom --target-version major
23 Custom(CustomParser { target_version: Some(Relative(Major)) })
24
25 $ typed-derive custom --target-version 10.0.0
26 Custom(CustomParser { target_version: Some(Absolute(Version { major: 10, minor: 0, patch: 0 })) })
27
28 $ typed-derive custom --target-version 10
29 ? failed
30 error: invalid value '10' for '--target-version <TARGET_VERSION>': unexpected end of input while parsing major version number
31
32 For more information, try '--help'.
33
34 $ typed-derive custom --target-version blue
35 ? failed
36 error: invalid value 'blue' for '--target-version <TARGET_VERSION>': unexpected character 'b' while parsing major version number
37
38 For more information, try '--help'.
39
40 ```