forked from withfig/autocomplete
-
Notifications
You must be signed in to change notification settings - Fork 0
/
asciinema.ts
172 lines (172 loc) · 4.24 KB
/
asciinema.ts
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
const completionSpec: Fig.Spec = {
name: "asciinema",
description: "Terminal sessoin recorder",
options: [
{
name: "--version",
description: "Ouput version information and exit",
},
{
name: ["-h", "--help"],
description: "Output help message and exit",
isPersistent: true,
},
],
subcommands: [
{
name: "rec",
description: "Start a recording",
args: {
name: "filename",
isOptional: true,
},
options: [
{
name: "--stdin",
description: "Enable stdin (keyboard) recording",
},
{
name: "--append",
description: "Append to existing recording",
},
{
name: "--raw",
description: "Save raw output, without timing or other metadata",
},
{
name: "--overwrite",
description: "Overwrite the recording if it already exists",
},
{
name: ["-c", "--command"],
insertValue: "-c='{cursor}'",
description: "Specify command to record, defaults to $SHELL",
requiresSeparator: true,
args: {
name: "command",
isCommand: true,
},
},
{
name: ["-e", "--env"],
insertValue: "-c='{cursor}'",
description: "List of environment variables to capture",
requiresSeparator: true,
args: {
name: "variables",
},
},
{
name: ["-t", "--title"],
insertValue: "-t='{cursor}'",
description: "Specify the title of the asciicast",
requiresSeparator: true,
args: {
name: "title",
},
},
{
name: ["-i", "--idle-time-limit"],
description:
"Limit recorded terminal inactivity to max amount of seconds",
requiresSeparator: true,
args: {
name: "seconds",
},
},
{
name: "--cols",
description: "Override terminal columns for recorded process",
requiresSeparator: true,
args: {
name: "cols",
},
},
{
name: "--rows",
description: "Override terminal rows for recorded process",
requiresSeparator: true,
args: {
name: "rows",
},
},
{
name: ["-y", "--yes"],
description: "Answer “yes” to all prompts (e.g. upload confirmation)",
},
{
name: ["-q", "--quiet"],
description: "Be quiet, suppress all notices/warnings (implies -y)",
},
],
},
{
name: "play",
description: "Replay recorded asciicast in a terminal",
args: {
name: "file or URL",
template: "filepaths",
suggestions: [
{
name: "-",
description: "Stdin",
},
],
},
options: [
{
name: ["-i", "--idle-time-linit"],
description: "Limit replayed terminal inactivity",
requiresSeparator: true,
args: {
name: "seconds",
description: "Can be fractional",
},
},
{
name: ["-s", "--speed"],
description: "Playback speed",
requiresSeparator: true,
args: {
name: "factor",
description: "Can be fractional",
},
},
],
},
{
name: "cat",
description: "Print full output of recorded asciicast to a terminal",
args: {
name: "file or URL",
template: "filepaths",
suggestions: [
{
name: "-",
description: "Stdin",
},
],
},
},
{
name: "upload",
description: "Upload recorded asciicast to asciinema.org site",
args: {
name: "file or URL",
template: "filepaths",
suggestions: [
{
name: "-",
description: "Stdin",
},
],
},
},
{
name: "auth",
description:
"Link and manage your install ID with your asciinema.org user account",
},
],
};
export default completionSpec;