Skip to content

Commit 79d6d55

Browse files
committed
feat: update sake completion spec
1 parent 473c9cb commit 79d6d55

File tree

1 file changed

+41
-2
lines changed

1 file changed

+41
-2
lines changed

Diff for: src/sake.ts

+41-2
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,19 @@ const commonOptions: Fig.Option[] = [
22
{
33
name: ["--config-path", "-c"],
44
description: "Specify the path to the configuration file",
5+
args: {
6+
name: "path",
7+
template: "filepaths",
8+
},
59
isPersistent: true,
610
},
711
{
812
name: ["--sake-app-path", "-s"],
913
description: "Specify the path for the SakeApp package",
14+
args: {
15+
name: "path",
16+
template: "folders",
17+
},
1018
isPersistent: true,
1119
},
1220
];
@@ -21,12 +29,21 @@ const commonCommandSpecificOptions: Fig.Option[] = [
2129
},
2230
priority: 55,
2331
},
32+
{
33+
name: ["--sake-app-prebuilt-binary-path", "-b"],
34+
description: "Specify the path to the prebuilt SakeApp binary",
35+
args: {
36+
name: "path",
37+
template: "filepaths",
38+
},
39+
priority: 55,
40+
},
2441
];
2542

2643
const completionSpec: Fig.Spec = {
2744
name: "sake",
2845
description:
29-
"🍶 Swift-based utility for managing command execution with dependencies and conditions, inspired by Make",
46+
"🍶 Swift-based utility for managing project commands, inspired by Make",
3047
generateSpec: async (_tokens, executeShellCommand) => {
3148
const { stdout } = await executeShellCommand({
3249
command: "sake",
@@ -38,7 +55,7 @@ const completionSpec: Fig.Spec = {
3855
const group = commands.groups[groupName];
3956
return [
4057
...acc,
41-
...group.map((command) => {
58+
...group.map((command: { name: string; description: string }) => {
4259
return {
4360
name: command.name,
4461
description: command.description || "The command to run",
@@ -69,6 +86,11 @@ const completionSpec: Fig.Spec = {
6986
"Remove all build artifacts generated by the SakeApp to ensure a clean state for future builds",
7087
options: [...commonOptions],
7188
},
89+
{
90+
name: "edit",
91+
description: "Open the SakeApp in Xcode (macOS only)",
92+
options: [...commonOptions],
93+
},
7294
{
7395
name: "list",
7496
description: "List all available commands defined in the SakeApp",
@@ -82,6 +104,18 @@ const completionSpec: Fig.Spec = {
82104
},
83105
],
84106
},
107+
{
108+
name: "build",
109+
description: "Manually trigger a rebuild of the SakeApp",
110+
options: [
111+
...commonOptions,
112+
{
113+
name: "--show-bin-path",
114+
description: "Print the path to the built SakeApp executable",
115+
priority: 45,
116+
},
117+
],
118+
},
85119
{
86120
name: "run",
87121
description: "Run the specified command from the SakeApp",
@@ -119,6 +153,11 @@ const completionSpec: Fig.Spec = {
119153
isPersistent: true,
120154
priority: 40,
121155
},
156+
{
157+
name: "--version",
158+
description: "Show the version",
159+
priority: 40,
160+
}
122161
],
123162
};
124163
export default completionSpec;

0 commit comments

Comments
 (0)