-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
/
Copy pathxcodeproj.ts
149 lines (147 loc) · 3.53 KB
/
xcodeproj.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
const projectsAndFoldersGenerator: Fig.Generator = {
template: "folders",
filterTemplateSuggestions: (paths) => {
return paths.map((file) => {
const isXcodeProjFolder = file.name.endsWith(".xcodeproj/");
return {
...file,
priority: isXcodeProjFolder && 76,
};
});
},
};
const completionSpec: Fig.Spec = {
name: "xcodeproj",
description: "Xcodeproj lets you create and modify Xcode projects",
subcommands: [
{
description:
"Dumps the build settings of all project targets for all configurations in directories named by the target in the given output directory",
name: "config-dump",
args: [
{
name: "PROJECT",
isOptional: true,
generators: projectsAndFoldersGenerator,
},
{
name: "OUTPUT",
isOptional: true,
template: "folders",
},
],
},
{
description: "Shows the difference between two projects",
name: "project-diff",
options: [
{
name: "--ignore",
requiresSeparator: true,
isRepeatable: true,
description:
"A key to ignore in the comparison. Can be specified multiple times",
args: {
name: "KEY",
},
},
],
args: [
{
name: "PROJECT1",
generators: projectsAndFoldersGenerator,
},
{
name: "PROJECT2",
generators: projectsAndFoldersGenerator,
},
],
},
{
description: "Shows an overview of a project in a YAML representation",
name: "show",
options: [
{
name: "--format",
requiresSeparator: true,
description: "YAML output format",
args: {
name: "FORMAT",
suggestions: ["hash", "tree_hash", "raw"],
},
},
],
args: {
name: "PROJECT",
isOptional: true,
generators: projectsAndFoldersGenerator,
},
},
{
description: "Sorts the given project",
name: "sort",
options: [
{
name: "--group-option",
requiresSeparator: true,
description:
"The position of the groups when sorting. If no option is specified sorting will interleave groups and files",
args: {
name: "POSITION",
suggestions: ["above", "below"],
},
},
],
args: {
name: "PROJECT",
generators: projectsAndFoldersGenerator,
isOptional: true,
},
},
{
description: "Shows the difference between two targets",
name: "target-diff",
options: [
{
name: "--project",
description: "The Xcode project document to use",
args: {
name: "PATH",
generators: projectsAndFoldersGenerator,
},
},
],
args: [
{
name: "TARGET1",
},
{
name: "TARGET2",
},
],
},
],
options: [
{
name: "--verbose",
icon: "🔊",
isPersistent: true,
description: "Show more debugging information",
},
{
name: "--version",
description: "Show the version of the tool",
},
{
name: "--no-ansi",
isPersistent: true,
description: "Show output without ANSI codes",
},
{
name: "--help",
isPersistent: true,
description: "Show help banner of specified command",
},
],
};
export default completionSpec;