-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
/
Copy pathln.ts
57 lines (55 loc) · 1.37 KB
/
ln.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
const sourceDestArgs: Fig.Arg[] = [
{
name: "source_file",
template: ["filepaths", "folders"],
// isVariadic: true,
// source_file is variadic but usability wise having it is less useful
// because it keeps recommending "source_file" repeatedly and not "link_name or link_dirname"
// and since most people won't need multiple files and those who do can look it up
},
{
name: "link_name or link_dirname",
isOptional: true,
},
];
const completionSpec: Fig.Spec = {
name: "ln",
description: "Create (default hard) symbolic links to files",
args: sourceDestArgs,
options: [
{
name: "-s",
description: "Create a symbolic link",
args: sourceDestArgs,
},
{
name: "-v",
description: "Verbose",
},
{
name: "-F",
description: "If link name already exists replace it",
args: sourceDestArgs,
},
{
name: "-h",
description: "Don't follow symbolic links",
},
{
name: "-f",
description:
"If link name already exists unlink the old one before creating the new one",
args: sourceDestArgs,
},
{
name: "-i",
description: "Prompt if proposed link already exists",
args: sourceDestArgs,
},
{
name: "-n",
description: "Same as -h don't follow symbolic links",
},
],
};
export default completionSpec;