-
Notifications
You must be signed in to change notification settings - Fork 0
/
foo.cmd.yaml
80 lines (80 loc) · 2.35 KB
/
foo.cmd.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
specVersion: 1.0.0
command:
name: foo
version: 1.0.0
help: The foo command allows quick testing of the brief interface
options:
- flag: ["--help"]
help: Show foo help
type: toggle
- flag: ["--version"]
help: Show foo version
type: toggle
subcommands:
- name: bar
help: The bar subcommand
options:
- flag: ["-t", "--toggle"]
help: Test how toggle flags work
type: toggle
- flag: ["-golang"]
help: Test how Go-style flags work
- flag: ["+dig"]
help: Test how dig-style flags work
- flag: ["--validate-<thing>"]
help: Test how template flags work
- flag: ["-o", "--optional"]
help: Test how optional value flags work
type: valueOptional
- flag: ["-s", "--sep"]
help: Test how value separators work
separator: =
- flag: ["--sep-two"]
help: Test how value separators work (no short flag)
separator: =
- flag: ["-d"]
help: Test how default values work
default: foobar
- flag: ["--placeholder"]
help: Test how placeholders work
placeholder: some-placeholder
- flag: ["--metavar"]
help: Test how metavars work
metavar: custom
- flag: ["--letters"]
help: Ensure flags are assigned different letters
- flag: ["--letters-two"]
help: Ensure flags are assigned different letters (again)
- flag: ["-r"]
help: Test how repeatable flags work
repeatable: true
- flag: ["--single-quote"]
help: Test how single quoting works
quoting: single
- flag: ["--double-quote"]
help: Test how double quoting works
quoting: double
- flag: ["--comp-list"]
help: Test how values completion works
completion:
values: ["one", "two", "three", "four"]
- argument: first
help: Test how positional arguments work
- argument: second
help: Test how repeatable positional arguments work
repeatable: true
- name: quuz
help: The quuz subcommand (no options)
- name: quux
help: The quux subcommand (which has a pretty long help text, to be honest)
options:
- flag: ["--sub-test"]
type: toggle
help: Toggle something!
subcommands:
- name: sub1
help: The first sub-sub command!
options:
- flag: ["--sub-sub-test"]
type: toggle
help: Toggle something, again!