forked from withfig/autocomplete
-
Notifications
You must be signed in to change notification settings - Fork 0
/
chmod.ts
88 lines (86 loc) · 2.65 KB
/
chmod.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
const completionSpec: Fig.Spec = {
name: "chmod",
description: "Change file modes or Access Control Lists.",
args: [
{
name: "mode",
suggestions: [
// Some of the most common chmod's (non-exhaustive)
{
name: "u+x",
type: "arg",
description: "give execute permission for the user",
icon: "🔐",
},
{
name: "a+rx",
type: "arg",
description: "adds read and execute permissions for all classes",
icon: "🔐",
},
{
name: "744",
type: "arg",
description:
"sets read, write, and execute permissions for user, and sets read permission for Group and Others",
icon: "🔐",
},
{
name: "664",
type: "arg",
description:
"sets read and write permissions for user and Group, and provides read to Others.",
icon: "🔐",
},
{
name: "777",
type: "arg",
description: "⚠️ allows all actions for all users",
icon: "🔐",
},
],
},
{
// Modifying
template: "filepaths",
},
],
options: [
{
name: "-f",
description:
"Do not display a diagnostic message if chmod could not modify the mode for file, nor modify the exit status to reflect such failures.",
},
{
name: "-H",
description:
"If the -R option is specified, symbolic links on the command line are followed and hence unaffected by the command. (Symbolic links encountered during tree traversal are not followed.).",
},
{
name: "-h",
description:
"If the file is a symbolic link, change the mode of the link itself rather than the file that the link points to.",
},
{
name: "-L",
description:
"If the -R option is specified, all symbolic links are followed.",
},
{
name: "-P",
description:
"If the -R option is specified, no symbolic links are followed. This is the default.",
},
{
name: "-R",
description:
"Change the modes of the file hierarchies rooted in the files, instead of just the files themselves. Beware of unintentionally matching the ``..'' hard link to the parent directory when using wildcards like ``.*''.",
},
{
name: "-v",
description:
"Cause chmod to be verbose, showing filenames as the mode is modified. If the -v flag is specified more than once, the old and new modes of the file will also be printed, in both octal and symbolic notation.",
},
],
};
export default completionSpec;