-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
/
Copy pathfirefox.ts
269 lines (268 loc) · 6.79 KB
/
firefox.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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
const completionSpec: Fig.Spec = {
name: "firefox",
description: "Free open-source web browser developer by Mozilla",
args: {
name: "URL",
description: "URL to open",
},
options: [
{
name: "--display",
description: "Specify an X display to use",
args: {
name: "display",
description: "X display to use",
},
},
{
name: "--sync",
description: "Make X calls synchronous",
},
{
name: "--g-fatal-warnings",
description: "Make all warnings fatal",
},
{
name: ["-h", "--help"],
description: "Print help message and exit",
},
{
name: ["-v", "--version"],
description: "Print version information and exit",
},
{
name: "--full-version",
description: "Print full version information and exit",
},
{
name: "-P",
description: "Specify profile to use",
args: {
name: "profile",
description: "Profile to use",
},
},
{
name: "--profile",
description: "Specify profile to use by folder",
args: {
name: "profile",
description: "Profile folder to use",
template: "folders",
},
},
{
name: "--migration",
description: "Start with migration wizard",
},
{
name: "--ProfileManager",
description: "Start with ProfileManager",
},
{
name: "--no-remote",
description:
"Do not accept or send remote commands; implies --new-instance",
exclusiveOn: ["--new-instance"],
},
{
name: "--new-instance",
description: "Open new instance, not a new window in running instance",
},
{
name: "--safe-mode",
description: "Disables extensions and themes for this session",
},
{
name: "--allow-downgrade",
description: "Allows downgrading a profile",
},
{
name: "--MOZ_LOG",
description:
"Treated as MOZ_LOG=<modules> environment variable, overrides it",
args: {
name: "modules",
// not sure how to describe this, don't know how it works
},
},
{
name: "--MOZ_LOG_FILE",
description:
"Treated as MOZ_LOG_FILE=<file> environment variable, overrides it. If MOZ_LOG_FILE is not specified as an argument or as an environment variable, logging will be written to stdout",
args: {
name: "file",
template: "filepaths",
// see comment on line 86
},
},
{
name: "--headless",
description: "Run without a GUI",
},
{
name: "--jsdebugger",
description:
"Open the Browser Toolbox. Defaults to the local build but can be overridden by a firefox path",
args: {
name: "folder",
// see comment on line 86
template: "folders",
isOptional: true,
},
},
{
name: "--wait-for-jsdebugger",
description:
"Spin event loop until JS debugger connects; enables debugging (some) application startup code paths",
dependsOn: ["--jsdebugger"],
},
{
name: "--start-debugger-server",
description:
"Start the devtools server on a TCP port or Unix domain socket path",
args: {
name: "port or path",
template: "filepaths",
generators: {
// Needs to trigger on every keystroke
trigger: () => true,
// Suggest current token if it's a port number
custom: async (tokens) => {
const finalToken = tokens[tokens.length - 1];
const port = Number(finalToken);
if (Number.isNaN(port)) return [];
if (!Number.isInteger(port)) return [];
if (port < 0 || port > 65535) return [];
return [{ name: finalToken, description: "Port number" }];
},
},
},
},
{
name: "--browser",
description: "Open a browser window",
},
{
name: "--new-window",
description: "Open a URL in a new window",
isRepeatable: true,
args: {
name: "URL",
description: "URL to open",
},
},
{
name: "--new-tab",
description: "Open a URL in a new tab",
isRepeatable: true,
args: {
name: "URL",
description: "URL to open",
},
},
{
name: "--private-window",
description: "Open a URL in a new private window",
isRepeatable: true,
args: {
name: "URL",
description: "URL to open",
},
},
{
name: "--preferences",
description: "Open the preferences dialog",
},
{
name: "--screenshot",
description: "Take a screenshot",
args: {
isOptional: true,
name: "folder",
description: "Folder to save screenshot to",
template: "folders",
},
},
{
name: "--window-size",
description: "Size of your screenshot",
dependsOn: ["--screenshot"],
args: [
{
name: "width",
description: "Width of your screenshot",
},
{
name: "height",
description: "Height of your screenshot",
isOptional: true,
},
],
},
{
name: "--search",
description: "Search for a term in your default search engine",
args: {
name: "term",
description: "Term to search for",
},
},
{
name: "--setDefaultBrowser",
description: "Set Firefox as the default browser",
},
{
name: "--first-startup",
description: "Run post-install actions before opening a new window",
},
{
name: "--kiosk",
description: "Start the browser in kiosk mode",
},
{
name: "--disable-pinch",
description: "Disable touch-screen and touch-pad pinch gestures",
},
{
name: "--jsconsole",
description: "Open the Browser Console",
},
{
name: "--devtools",
description: "Open DevTools on initial load",
},
{
name: "--marionette",
description: "Enable remote debugging server",
},
{
name: "--remote-debugging-port",
description:
"Start the Firefox Remote Agent, which is a low-level remote debugging interface used for WebDriver",
args: {
name: "port",
description: "Defaults to port 9222",
isOptional: true,
default: "9222",
},
},
{
name: "--allow-remote-hosts",
description: "Values of the Host header to allow for incoming requests",
args: {
name: "hosts",
// see comment on line 86
},
},
{
name: "--allow-remote-origins",
description: "Values of the Origin header to allow for incoming requests",
args: {
name: "origins",
// see comment on line 86
},
},
],
};
export default completionSpec;