-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Expand file tree
/
Copy pathcommand.tpl
More file actions
59 lines (53 loc) · 1.04 KB
/
command.tpl
File metadata and controls
59 lines (53 loc) · 1.04 KB
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
<!-- DO NOT EDIT | GENERATED CONTENT -->
# {{ fullName . }}
{{ with .Short }}
{{ . }}
{{ end }}
{{ with .Aliases }}
Aliases:
{{- range $index, $alias := . }}
* {{ $alias }}
{{- end }}
{{ end }}
{{- if .Use }}
## Usage
```console
{{ .FullUsage }}
```
{{end}}
{{- if .Long}}
## Description
```console
{{.Long}}
```
{{end}}
{{- range $index, $cmd := visibleSubcommands . }}
{{- if eq $index 0 }}
## Subcommands
| Name | Purpose |
| ---- | ----- |
{{- end }}
| [{{ $cmd.Name | wrapCode }}](./{{commandURI $cmd}}) | {{ $cmd.Short }} |
{{- end}}
{{ "" }}
{{- range $index, $opt := visibleOptions . }}
{{- if eq $index 0 }}
## Options
{{- end }}
### {{ with $opt.FlagShorthand}}-{{ . }}, {{end}}--{{ $opt.Flag }}
{{" "}}
{{ tableHeader }}
| Type | {{ typeHelper $opt | wrapCode }} |
{{- with $opt.Env }}
| Environment | {{ (print "$" .) | wrapCode }} |
{{- end }}
{{- with $opt.YAMLPath }}
| YAML | {{ . | wrapCode }} |
{{- end }}
{{- with $opt.Default }}
| Default | {{- . | wrapCode }} |
{{ "" }}
{{ end }}
{{ "" }}
{{ $opt.Description | newLinesToBr }}
{{- end}}