@shell-shock/plugin-completions 0.4.30 → 0.4.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/bash-config-command.cjs +17 -17
- package/dist/components/bash-config-command.d.cts.map +1 -1
- package/dist/components/bash-config-command.mjs +5 -5
- package/dist/components/bash-script-command.cjs +14 -14
- package/dist/components/bash-script-command.d.cts.map +1 -1
- package/dist/components/bash-script-command.mjs +5 -5
- package/dist/components/bash-shared.cjs +8 -8
- package/dist/components/bash-shared.d.cts.map +1 -1
- package/dist/components/bash-shared.mjs +4 -4
- package/dist/components/fish-config-command.cjs +17 -17
- package/dist/components/fish-config-command.d.cts.map +1 -1
- package/dist/components/fish-config-command.mjs +5 -5
- package/dist/components/fish-script-command.cjs +13 -13
- package/dist/components/fish-script-command.d.cts.map +1 -1
- package/dist/components/fish-script-command.mjs +5 -5
- package/dist/components/fish-shared.cjs +8 -8
- package/dist/components/fish-shared.d.cts.map +1 -1
- package/dist/components/fish-shared.mjs +4 -4
- package/dist/components/powershell-config-command.cjs +15 -15
- package/dist/components/powershell-config-command.d.cts.map +1 -1
- package/dist/components/powershell-config-command.mjs +4 -4
- package/dist/components/powershell-script-command.cjs +14 -14
- package/dist/components/powershell-script-command.d.cts.map +1 -1
- package/dist/components/powershell-script-command.mjs +5 -5
- package/dist/components/powershell-shared.cjs +8 -8
- package/dist/components/powershell-shared.d.cts.map +1 -1
- package/dist/components/powershell-shared.mjs +4 -4
- package/dist/components/zsh-config-command.cjs +17 -17
- package/dist/components/zsh-config-command.d.cts.map +1 -1
- package/dist/components/zsh-config-command.mjs +5 -5
- package/dist/components/zsh-script-command.cjs +14 -14
- package/dist/components/zsh-script-command.d.cts.map +1 -1
- package/dist/components/zsh-script-command.mjs +5 -5
- package/dist/components/zsh-shared.cjs +8 -8
- package/dist/components/zsh-shared.d.cts.map +1 -1
- package/dist/components/zsh-shared.mjs +4 -4
- package/dist/generator-BDvpem35.cjs +63 -0
- package/dist/generator-DQoArSbb.mjs +59 -0
- package/dist/generator-DQoArSbb.mjs.map +1 -0
- package/dist/generator.cjs +5 -0
- package/dist/generator.d.cts +10 -0
- package/dist/generator.d.cts.map +1 -0
- package/dist/generator.d.mts +10 -0
- package/dist/generator.d.mts.map +1 -0
- package/dist/generator.mjs +3 -0
- package/dist/helpers/complete-command.cjs +0 -1
- package/dist/helpers/complete-command.d.cts.map +1 -1
- package/dist/helpers/completion-directive-constants.cjs +0 -1
- package/dist/helpers/completion-directive-constants.d.cts.map +1 -1
- package/dist/index.cjs +221 -238
- package/dist/index.d.cts +4 -3
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +4 -3
- package/dist/index.mjs +221 -239
- package/dist/shell-type-DETq6QwA.d.cts +6 -0
- package/dist/shell-type-DETq6QwA.d.cts.map +1 -0
- package/dist/shell-type-DETq6QwA.d.mts +6 -0
- package/dist/shell-type-DETq6QwA.d.mts.map +1 -0
- package/dist/types/index.cjs +1 -0
- package/dist/types/index.d.cts +1 -1
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.mjs +1 -0
- package/dist/types/plugin.d.cts +1 -2
- package/dist/types/plugin.d.cts.map +1 -1
- package/dist/types/plugin.d.mts +1 -2
- package/dist/types/shell-type.cjs +0 -1
- package/dist/types/shell-type.d.cts +2 -6
- package/dist/types/shell-type.d.mts +2 -6
- package/package.json +28 -14
- package/dist/types/shell-type.d.cts.map +0 -1
- package/dist/types/shell-type.d.mts.map +0 -1
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { BashConfigCompletionsCommand } from "./components/bash-config-command.mjs";
|
|
2
|
+
import { BashScriptCompletionsCommand } from "./components/bash-script-command.mjs";
|
|
3
|
+
import { BashCompletionsShared } from "./components/bash-shared.mjs";
|
|
4
|
+
import { FishConfigCompletionsCommand } from "./components/fish-config-command.mjs";
|
|
5
|
+
import { FishScriptCompletionsCommand } from "./components/fish-script-command.mjs";
|
|
6
|
+
import { FishCompletionsShared } from "./components/fish-shared.mjs";
|
|
7
|
+
import { PowerShellConfigCompletionsCommand } from "./components/powershell-config-command.mjs";
|
|
8
|
+
import { PowerShellScriptCompletionsCommand } from "./components/powershell-script-command.mjs";
|
|
9
|
+
import { PowerShellCompletionsShared } from "./components/powershell-shared.mjs";
|
|
10
|
+
import { ZshConfigCompletionsCommand } from "./components/zsh-config-command.mjs";
|
|
11
|
+
import { ZshScriptCompletionsCommand } from "./components/zsh-script-command.mjs";
|
|
12
|
+
import { ZshCompletionsShared } from "./components/zsh-shared.mjs";
|
|
13
|
+
import "./components/index.mjs";
|
|
14
|
+
import { defineCommandGenerator, renderCommandTemplate } from "@shell-shock/core/helpers/power-plant";
|
|
15
|
+
import { createComponent } from "@alloy-js/core/jsx-runtime";
|
|
16
|
+
|
|
17
|
+
//#region package.json
|
|
18
|
+
var version = "0.4.31";
|
|
19
|
+
|
|
20
|
+
//#endregion
|
|
21
|
+
//#region src/generator.tsx
|
|
22
|
+
/**
|
|
23
|
+
* Power Plant generator for Shell Shock shell completion commands.
|
|
24
|
+
*
|
|
25
|
+
* @see https://github.com/storm-software/power-plant/tree/main/packages/generators/alloy-js
|
|
26
|
+
*/
|
|
27
|
+
const completionsGenerator = defineCommandGenerator({
|
|
28
|
+
meta: {
|
|
29
|
+
name: "shell-shock-completions",
|
|
30
|
+
title: "Shell Shock Completions Generator",
|
|
31
|
+
description: "Generates shell completion shared modules and commands from the Shell Shock command tree specification.",
|
|
32
|
+
version,
|
|
33
|
+
tags: [
|
|
34
|
+
"shell-shock",
|
|
35
|
+
"completions",
|
|
36
|
+
"alloy-js"
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
generator: async (_commands, options) => {
|
|
40
|
+
await renderCommandTemplate(options, [
|
|
41
|
+
createComponent(BashCompletionsShared, {}),
|
|
42
|
+
createComponent(BashScriptCompletionsCommand, {}),
|
|
43
|
+
createComponent(BashConfigCompletionsCommand, {}),
|
|
44
|
+
createComponent(ZshCompletionsShared, {}),
|
|
45
|
+
createComponent(ZshScriptCompletionsCommand, {}),
|
|
46
|
+
createComponent(ZshConfigCompletionsCommand, {}),
|
|
47
|
+
createComponent(PowerShellCompletionsShared, {}),
|
|
48
|
+
createComponent(PowerShellScriptCompletionsCommand, {}),
|
|
49
|
+
createComponent(PowerShellConfigCompletionsCommand, {}),
|
|
50
|
+
createComponent(FishCompletionsShared, {}),
|
|
51
|
+
createComponent(FishScriptCompletionsCommand, {}),
|
|
52
|
+
createComponent(FishConfigCompletionsCommand, {})
|
|
53
|
+
]);
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
//#endregion
|
|
58
|
+
export { completionsGenerator as t };
|
|
59
|
+
//# sourceMappingURL=generator-DQoArSbb.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generator-DQoArSbb.mjs","names":[],"sources":[],"mappings":""}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
2
|
+
const require_generator = require('./generator-BDvpem35.cjs');
|
|
3
|
+
|
|
4
|
+
exports.completionsGenerator = require_generator.completionsGenerator;
|
|
5
|
+
exports.default = require_generator.completionsGenerator;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//#region src/generator.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Power Plant generator for Shell Shock shell completion commands.
|
|
4
|
+
*
|
|
5
|
+
* @see https://github.com/storm-software/power-plant/tree/main/packages/generators/alloy-js
|
|
6
|
+
*/
|
|
7
|
+
declare const completionsGenerator: import("@power-plant/core").GeneratorConfigObject<Record<string, import("@shell-shock/schema").SerializedCommandTree>, import("@shell-shock/core/helpers/power-plant").CommandGeneratorOptions, void>;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { completionsGenerator, completionsGenerator as default };
|
|
10
|
+
//# sourceMappingURL=generator.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generator.d.cts","names":[],"sources":["../src/generator.tsx"],"mappings":";;;;;;cA2Ca,kDAAoB,sBAAA,6CAAA,wEAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//#region src/generator.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Power Plant generator for Shell Shock shell completion commands.
|
|
4
|
+
*
|
|
5
|
+
* @see https://github.com/storm-software/power-plant/tree/main/packages/generators/alloy-js
|
|
6
|
+
*/
|
|
7
|
+
declare const completionsGenerator: import("@power-plant/core").GeneratorConfigObject<Record<string, import("@shell-shock/schema").SerializedCommandTree>, import("@shell-shock/core/helpers/power-plant").CommandGeneratorOptions, void>;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { completionsGenerator, completionsGenerator as default };
|
|
10
|
+
//# sourceMappingURL=generator.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generator.d.mts","names":[],"sources":["../src/generator.tsx"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"complete-command.d.cts","names":[],"sources":["../../src/helpers/complete-command.ts"],"mappings":";cAsBa
|
|
1
|
+
{"version":3,"file":"complete-command.d.cts","names":[],"sources":["../../src/helpers/complete-command.ts"],"mappings":";cAsBa"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"completion-directive-constants.d.cts","names":[],"sources":["../../src/helpers/completion-directive-constants.ts"],"mappings":";cAkBa
|
|
1
|
+
{"version":3,"file":"completion-directive-constants.d.cts","names":[],"sources":["../../src/helpers/completion-directive-constants.ts"],"mappings":";cAkBa"}
|
package/dist/index.cjs
CHANGED
|
@@ -1,20 +1,7 @@
|
|
|
1
1
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
2
|
-
const
|
|
3
|
-
const require_components_bash_script_command = require('./components/bash-script-command.cjs');
|
|
4
|
-
const require_components_bash_shared = require('./components/bash-shared.cjs');
|
|
5
|
-
const require_components_fish_config_command = require('./components/fish-config-command.cjs');
|
|
6
|
-
const require_components_fish_script_command = require('./components/fish-script-command.cjs');
|
|
7
|
-
const require_components_fish_shared = require('./components/fish-shared.cjs');
|
|
8
|
-
const require_components_powershell_config_command = require('./components/powershell-config-command.cjs');
|
|
9
|
-
const require_components_powershell_script_command = require('./components/powershell-script-command.cjs');
|
|
10
|
-
const require_components_powershell_shared = require('./components/powershell-shared.cjs');
|
|
11
|
-
const require_components_zsh_config_command = require('./components/zsh-config-command.cjs');
|
|
12
|
-
const require_components_zsh_script_command = require('./components/zsh-script-command.cjs');
|
|
13
|
-
const require_components_zsh_shared = require('./components/zsh-shared.cjs');
|
|
14
|
-
require('./components/index.cjs');
|
|
2
|
+
const require_generator = require('./generator-BDvpem35.cjs');
|
|
15
3
|
const require_types_shell_type = require('./types/shell-type.cjs');
|
|
16
|
-
let
|
|
17
|
-
let _powerlines_plugin_alloy_render = require("@powerlines/plugin-alloy/render");
|
|
4
|
+
let _shell_shock_core_helpers_power_plant = require("@shell-shock/core/helpers/power-plant");
|
|
18
5
|
let _shell_shock_core_plugin_utils = require("@shell-shock/core/plugin-utils");
|
|
19
6
|
let _stryke_path_join = require("@stryke/path/join");
|
|
20
7
|
|
|
@@ -49,242 +36,238 @@ const plugin = (options = {}) => {
|
|
|
49
36
|
entry: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "index.ts") },
|
|
50
37
|
virtual: true
|
|
51
38
|
});
|
|
52
|
-
if (this.config.completions.shells.includes("bash"))
|
|
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
|
-
|
|
39
|
+
if (this.config.completions.shells.includes("bash")) {
|
|
40
|
+
if (this.inputs.some((input) => input.id === "completions-bash")) this.info("The `completions-bash` command already exists in the commands list. If you would like the completions-bash command to be managed by the `@shell-shock/plugin-completions` package, please remove or rename the command.");
|
|
41
|
+
else {
|
|
42
|
+
this.inputs.push({
|
|
43
|
+
id: "completions-bash",
|
|
44
|
+
name: "bash",
|
|
45
|
+
description: `Commands to setup bash completions for the ${(0, _shell_shock_core_plugin_utils.getAppTitle)(this, true)} command-line interface.`,
|
|
46
|
+
alias: [],
|
|
47
|
+
path: "completions/bash",
|
|
48
|
+
segments: ["completions", "bash"],
|
|
49
|
+
title: "Completions - Bash",
|
|
50
|
+
tags: ["Utility"],
|
|
51
|
+
entry: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "bash", "index.ts") },
|
|
52
|
+
virtual: true
|
|
53
|
+
});
|
|
54
|
+
this.inputs.push({
|
|
55
|
+
id: "completions-bash-script",
|
|
56
|
+
name: "script",
|
|
57
|
+
description: `Generate a bash completion script for the ${(0, _shell_shock_core_plugin_utils.getAppTitle)(this, true)} command-line interface.`,
|
|
58
|
+
alias: [],
|
|
59
|
+
path: "completions/bash/script",
|
|
60
|
+
segments: [
|
|
61
|
+
"completions",
|
|
62
|
+
"bash",
|
|
63
|
+
"script"
|
|
64
|
+
],
|
|
65
|
+
title: "Completions - Bash Script",
|
|
66
|
+
tags: ["Utility"],
|
|
67
|
+
entry: {
|
|
68
|
+
file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "bash", "script", "index.ts"),
|
|
69
|
+
input: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "bash", "script", "command.ts") }
|
|
70
|
+
},
|
|
71
|
+
virtual: false
|
|
72
|
+
});
|
|
73
|
+
this.inputs.push({
|
|
74
|
+
id: "completions-bash-config",
|
|
75
|
+
name: "config",
|
|
76
|
+
description: `Update the current system's bash shell configuration to include completions for the ${(0, _shell_shock_core_plugin_utils.getAppTitle)(this, true)} command-line interface.`,
|
|
77
|
+
alias: [],
|
|
78
|
+
path: "completions/bash/config",
|
|
79
|
+
segments: [
|
|
80
|
+
"completions",
|
|
81
|
+
"bash",
|
|
82
|
+
"config"
|
|
83
|
+
],
|
|
84
|
+
title: "Completions - Bash Configuration",
|
|
85
|
+
tags: ["Utility"],
|
|
86
|
+
entry: {
|
|
87
|
+
file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "bash", "config", "index.ts"),
|
|
88
|
+
input: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "bash", "config", "command.ts") }
|
|
89
|
+
},
|
|
90
|
+
virtual: false
|
|
91
|
+
});
|
|
92
|
+
}
|
|
104
93
|
}
|
|
105
|
-
if (this.config.completions.shells.includes("zsh"))
|
|
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
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
94
|
+
if (this.config.completions.shells.includes("zsh")) {
|
|
95
|
+
if (this.inputs.some((input) => input.id === "completions-zsh")) this.info("The `completions-zsh` command already exists in the commands list. If you would like the completions-zsh command to be managed by the `@shell-shock/plugin-completions` package, please remove or rename the command.");
|
|
96
|
+
else {
|
|
97
|
+
this.inputs.push({
|
|
98
|
+
id: "completions-zsh",
|
|
99
|
+
name: "zsh",
|
|
100
|
+
description: `Commands to setup Zsh completions for the ${(0, _shell_shock_core_plugin_utils.getAppTitle)(this, true)} command-line interface.`,
|
|
101
|
+
alias: [],
|
|
102
|
+
path: "completions/zsh",
|
|
103
|
+
segments: ["completions", "zsh"],
|
|
104
|
+
title: "Completions - Zsh",
|
|
105
|
+
tags: ["Utility"],
|
|
106
|
+
entry: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "zsh", "index.ts") },
|
|
107
|
+
virtual: true
|
|
108
|
+
});
|
|
109
|
+
this.inputs.push({
|
|
110
|
+
id: "completions-zsh-script",
|
|
111
|
+
name: "script",
|
|
112
|
+
description: `Generate a Zsh completion script for the ${(0, _shell_shock_core_plugin_utils.getAppTitle)(this, true)} command-line interface.`,
|
|
113
|
+
alias: [],
|
|
114
|
+
path: "completions/zsh/script",
|
|
115
|
+
segments: [
|
|
116
|
+
"completions",
|
|
117
|
+
"zsh",
|
|
118
|
+
"script"
|
|
119
|
+
],
|
|
120
|
+
title: "Completions - Zsh Script",
|
|
121
|
+
tags: ["Utility"],
|
|
122
|
+
entry: {
|
|
123
|
+
file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "zsh", "script", "index.ts"),
|
|
124
|
+
input: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "zsh", "script", "command.ts") }
|
|
125
|
+
},
|
|
126
|
+
virtual: false
|
|
127
|
+
});
|
|
128
|
+
this.inputs.push({
|
|
129
|
+
id: "completions-zsh-config",
|
|
130
|
+
name: "config",
|
|
131
|
+
description: `Update the current system's Zsh shell configuration to include completions for the ${(0, _shell_shock_core_plugin_utils.getAppTitle)(this, true)} command-line interface.`,
|
|
132
|
+
alias: [],
|
|
133
|
+
path: "completions/zsh/config",
|
|
134
|
+
segments: [
|
|
135
|
+
"completions",
|
|
136
|
+
"zsh",
|
|
137
|
+
"config"
|
|
138
|
+
],
|
|
139
|
+
title: "Completions - Zsh Configuration",
|
|
140
|
+
tags: ["Utility"],
|
|
141
|
+
entry: {
|
|
142
|
+
file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "zsh", "config", "index.ts"),
|
|
143
|
+
input: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "zsh", "config", "command.ts") }
|
|
144
|
+
},
|
|
145
|
+
virtual: false
|
|
146
|
+
});
|
|
147
|
+
}
|
|
157
148
|
}
|
|
158
|
-
if (this.config.completions.shells.includes("powershell"))
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
149
|
+
if (this.config.completions.shells.includes("powershell")) {
|
|
150
|
+
if (this.inputs.some((input) => input.id === "completions-powershell")) this.info("The `completions-powershell` command already exists in the commands list. If you would like the completions-powershell command to be managed by the `@shell-shock/plugin-completions` package, please remove or rename the command.");
|
|
151
|
+
else {
|
|
152
|
+
this.inputs.push({
|
|
153
|
+
id: "completions-powershell",
|
|
154
|
+
name: "powershell",
|
|
155
|
+
description: `Commands to setup PowerShell completions for the ${(0, _shell_shock_core_plugin_utils.getAppTitle)(this, true)} command-line interface.`,
|
|
156
|
+
alias: [],
|
|
157
|
+
path: "completions/powershell",
|
|
158
|
+
segments: ["completions", "powershell"],
|
|
159
|
+
title: "Completions - PowerShell",
|
|
160
|
+
tags: ["Utility"],
|
|
161
|
+
entry: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "powershell", "index.ts") },
|
|
162
|
+
virtual: true
|
|
163
|
+
});
|
|
164
|
+
this.inputs.push({
|
|
165
|
+
id: "completions-powershell-script",
|
|
166
|
+
name: "script",
|
|
167
|
+
description: `Generate a PowerShell completion script for the ${(0, _shell_shock_core_plugin_utils.getAppTitle)(this, true)} command-line interface.`,
|
|
168
|
+
alias: [],
|
|
169
|
+
path: "completions/powershell/script",
|
|
170
|
+
segments: [
|
|
171
|
+
"completions",
|
|
172
|
+
"powershell",
|
|
173
|
+
"script"
|
|
174
|
+
],
|
|
175
|
+
title: "Completions - PowerShell Script",
|
|
176
|
+
tags: ["Utility"],
|
|
177
|
+
entry: {
|
|
178
|
+
file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "powershell", "script", "index.ts"),
|
|
179
|
+
input: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "powershell", "script", "command.ts") }
|
|
180
|
+
},
|
|
181
|
+
virtual: false
|
|
182
|
+
});
|
|
183
|
+
this.inputs.push({
|
|
184
|
+
id: "completions-powershell-config",
|
|
185
|
+
name: "config",
|
|
186
|
+
description: `Update the current system's PowerShell configuration to include completions for the ${(0, _shell_shock_core_plugin_utils.getAppTitle)(this, true)} command-line interface.`,
|
|
187
|
+
alias: [],
|
|
188
|
+
path: "completions/powershell/config",
|
|
189
|
+
segments: [
|
|
190
|
+
"completions",
|
|
191
|
+
"powershell",
|
|
192
|
+
"config"
|
|
193
|
+
],
|
|
194
|
+
title: "Completions - PowerShell Configuration",
|
|
195
|
+
tags: ["Utility"],
|
|
196
|
+
entry: {
|
|
197
|
+
file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "powershell", "config", "index.ts"),
|
|
198
|
+
input: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "powershell", "config", "command.ts") }
|
|
199
|
+
},
|
|
200
|
+
virtual: false
|
|
201
|
+
});
|
|
202
|
+
}
|
|
210
203
|
}
|
|
211
|
-
if (this.config.completions.shells.includes("fish"))
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
204
|
+
if (this.config.completions.shells.includes("fish")) {
|
|
205
|
+
if (this.inputs.some((input) => input.id === "completions-fish")) this.info("The `completions-fish` command already exists in the commands list. If you would like the completions-fish command to be managed by the `@shell-shock/plugin-completions` package, please remove or rename the command.");
|
|
206
|
+
else {
|
|
207
|
+
this.inputs.push({
|
|
208
|
+
id: "completions-fish",
|
|
209
|
+
name: "fish",
|
|
210
|
+
description: `Commands to setup Fish completions for the ${(0, _shell_shock_core_plugin_utils.getAppTitle)(this, true)} command-line interface.`,
|
|
211
|
+
alias: [],
|
|
212
|
+
path: "completions/fish",
|
|
213
|
+
segments: ["completions", "fish"],
|
|
214
|
+
title: "Completions - Fish",
|
|
215
|
+
tags: ["Utility"],
|
|
216
|
+
entry: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "fish", "index.ts") },
|
|
217
|
+
virtual: true
|
|
218
|
+
});
|
|
219
|
+
this.inputs.push({
|
|
220
|
+
id: "completions-fish-script",
|
|
221
|
+
name: "script",
|
|
222
|
+
description: `Generate a Fish completion script for the ${(0, _shell_shock_core_plugin_utils.getAppTitle)(this, true)} command-line interface.`,
|
|
223
|
+
alias: [],
|
|
224
|
+
path: "completions/fish/script",
|
|
225
|
+
segments: [
|
|
226
|
+
"completions",
|
|
227
|
+
"fish",
|
|
228
|
+
"script"
|
|
229
|
+
],
|
|
230
|
+
title: "Completions - Fish Script",
|
|
231
|
+
tags: ["Utility"],
|
|
232
|
+
entry: {
|
|
233
|
+
file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "fish", "script", "index.ts"),
|
|
234
|
+
input: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "fish", "script", "command.ts") }
|
|
235
|
+
},
|
|
236
|
+
virtual: false
|
|
237
|
+
});
|
|
238
|
+
this.inputs.push({
|
|
239
|
+
id: "completions-fish-config",
|
|
240
|
+
name: "config",
|
|
241
|
+
description: `Update the current system's Fish shell configuration to include completions for the ${(0, _shell_shock_core_plugin_utils.getAppTitle)(this, true)} command-line interface.`,
|
|
242
|
+
alias: [],
|
|
243
|
+
path: "completions/fish/config",
|
|
244
|
+
segments: [
|
|
245
|
+
"completions",
|
|
246
|
+
"fish",
|
|
247
|
+
"config"
|
|
248
|
+
],
|
|
249
|
+
title: "Completions - Fish Configuration",
|
|
250
|
+
tags: ["Utility"],
|
|
251
|
+
entry: {
|
|
252
|
+
file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "fish", "config", "index.ts"),
|
|
253
|
+
input: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "fish", "config", "command.ts") }
|
|
254
|
+
},
|
|
255
|
+
virtual: false
|
|
256
|
+
});
|
|
257
|
+
}
|
|
263
258
|
}
|
|
264
259
|
},
|
|
265
260
|
prepare: {
|
|
266
261
|
order: "pre",
|
|
267
262
|
async handler() {
|
|
268
|
-
this.debug("Rendering command handling modules for the Shell Shock `completions` plugin.");
|
|
269
|
-
return (0,
|
|
270
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(require_components_bash_shared.BashCompletionsShared, {}),
|
|
271
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(require_components_bash_script_command.BashScriptCompletionsCommand, {}),
|
|
272
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(require_components_bash_config_command.BashConfigCompletionsCommand, {}),
|
|
273
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(require_components_zsh_shared.ZshCompletionsShared, {}),
|
|
274
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(require_components_zsh_script_command.ZshScriptCompletionsCommand, {}),
|
|
275
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(require_components_zsh_config_command.ZshConfigCompletionsCommand, {}),
|
|
276
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(require_components_powershell_shared.PowerShellCompletionsShared, {}),
|
|
277
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(require_components_powershell_script_command.PowerShellScriptCompletionsCommand, {}),
|
|
278
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(require_components_powershell_config_command.PowerShellConfigCompletionsCommand, {}),
|
|
279
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(require_components_fish_shared.FishCompletionsShared, {}),
|
|
280
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(require_components_fish_script_command.FishScriptCompletionsCommand, {}),
|
|
281
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(require_components_fish_config_command.FishConfigCompletionsCommand, {})
|
|
282
|
-
]);
|
|
263
|
+
this.debug("Rendering command handling modules via Power Plant for the Shell Shock `completions` plugin.");
|
|
264
|
+
return (0, _shell_shock_core_helpers_power_plant.executeCommandGenerator)(this, require_generator.completionsGenerator);
|
|
283
265
|
}
|
|
284
266
|
}
|
|
285
267
|
};
|
|
286
268
|
};
|
|
287
269
|
|
|
288
270
|
//#endregion
|
|
271
|
+
exports.completionsGenerator = require_generator.completionsGenerator;
|
|
289
272
|
exports.default = plugin;
|
|
290
273
|
exports.plugin = plugin;
|