forked from withfig/autocomplete
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cp.ts
79 lines (78 loc) · 2.07 KB
/
cp.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
const completionSpec: Fig.Spec = {
name: "cp",
description: "Copy files and directories",
args: [
{
name: "source",
template: ["filepaths", "folders"],
isVariadic: true,
},
{
name: "target",
template: ["filepaths", "folders"],
},
],
options: [
{
name: "-a",
description:
"Preserves structure and attributes of files but not directory structure",
},
{
name: "-f",
description:
"If the destination file cannot be opened, remove it and create a new file, without prompting for confirmation",
exclusiveOn: ["-n"],
},
{
name: "-H",
description:
"If the -R option is specified, symbolic links on the command line are followed",
exclusiveOn: ["-L", "-P"],
dependsOn: ["-R"],
},
{
name: "-i",
description:
"Cause cp to write a prompt to the standard error output before copying a file that would overwrite an existing file",
exclusiveOn: ["-n"],
},
{
name: "-L",
description:
"If the -R option is specified, all symbolic links are followed",
exclusiveOn: ["-H", "-P"],
dependsOn: ["-R"],
},
{
name: "-n",
description: "Do not overwrite an existing file",
exclusiveOn: ["-f", "-i"],
},
{
name: "-P",
description:
"If the -R option is specified, no symbolic links are followed",
exclusiveOn: ["-H", "-L"],
dependsOn: ["-R"],
},
{
name: "-R",
description:
"If source designates a directory, cp copies the directory and the entire subtree connected at that point. If source ends in a /, the contents of the directory are copied rather than the directory itself",
},
{
name: "-v",
description: "Cause cp to be verbose, showing files as they are copied",
},
{
name: "-X",
description: "Do not copy Extended Attributes (EAs) or resource forks",
},
{
name: "-c",
description: "Copy files using clonefile",
},
],
};
export default completionSpec;