forked from withfig/autocomplete
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnode.js
More file actions
39 lines (38 loc) · 1.07 KB
/
node.js
File metadata and controls
39 lines (38 loc) · 1.07 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
var completionSpec = {
name: "node",
description: "Run the node interpretor",
args: {
generators: {
template: "filepaths",
filterTemplateSuggestions: function (paths) {
return paths.filter(file => {
return file.name.endsWith('.js') || file.name.endsWith('/')
})
}
}
},
options: [
{
name: ["-e", "--eval=..."],
insertValue: "-e '{cursor}'",
description: "evaluate script",
args: {},
},
{
name: ["-p", "--print"],
description: "evaluate script and print result",
},
{
name: ["-c", "--check"],
description: "syntax check script without executing",
},
{
name: ["-v", "--version"],
description: "print Node.js version",
},
{
name: ["-i", "--interactive"],
description: "always enter the REPL even if stdin does not appear to be a terminal",
}
]
}