@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
package/dist/index.d.cts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { completionsGenerator } from "./generator.cjs";
|
|
2
|
+
import { n as ShellType, t as SHELL_TYPES } from "./shell-type-DETq6QwA.cjs";
|
|
2
3
|
import { CompletionsPluginContext, CompletionsPluginOptions, CompletionsPluginResolvedConfig, CompletionsPluginUserConfig } from "./types/plugin.cjs";
|
|
4
|
+
import "./types/index.cjs";
|
|
3
5
|
import { Plugin } from "powerlines";
|
|
4
|
-
|
|
5
6
|
//#region src/index.d.ts
|
|
6
7
|
/**
|
|
7
8
|
* The Completions - Shell Shock plugin to add completion commands to a Shell Shock application.
|
|
8
9
|
*/
|
|
9
10
|
declare const plugin: <TContext extends CompletionsPluginContext = CompletionsPluginContext>(options?: CompletionsPluginOptions) => Plugin<TContext>;
|
|
10
11
|
//#endregion
|
|
11
|
-
export { type CompletionsPluginContext, type CompletionsPluginOptions, type CompletionsPluginResolvedConfig, type CompletionsPluginUserConfig, type SHELL_TYPES, type ShellType, plugin as default, plugin };
|
|
12
|
+
export { type CompletionsPluginContext, type CompletionsPluginOptions, type CompletionsPluginResolvedConfig, type CompletionsPluginUserConfig, type SHELL_TYPES, type ShellType, completionsGenerator, plugin as default, plugin };
|
|
12
13
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.tsx"],"mappings":";;;;;;;;;cAmCa,SACX,iBAAiB,2BAA2B,0BAE5C,UAAS,6BACR,OAAO"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { completionsGenerator } from "./generator.mjs";
|
|
2
|
+
import { n as ShellType, t as SHELL_TYPES } from "./shell-type-DETq6QwA.mjs";
|
|
2
3
|
import { CompletionsPluginContext, CompletionsPluginOptions, CompletionsPluginResolvedConfig, CompletionsPluginUserConfig } from "./types/plugin.mjs";
|
|
4
|
+
import "./types/index.mjs";
|
|
3
5
|
import { Plugin } from "powerlines";
|
|
4
|
-
|
|
5
6
|
//#region src/index.d.ts
|
|
6
7
|
/**
|
|
7
8
|
* The Completions - Shell Shock plugin to add completion commands to a Shell Shock application.
|
|
8
9
|
*/
|
|
9
10
|
declare const plugin: <TContext extends CompletionsPluginContext = CompletionsPluginContext>(options?: CompletionsPluginOptions) => Plugin<TContext>;
|
|
10
11
|
//#endregion
|
|
11
|
-
export { type CompletionsPluginContext, type CompletionsPluginOptions, type CompletionsPluginResolvedConfig, type CompletionsPluginUserConfig, type SHELL_TYPES, type ShellType, plugin as default, plugin };
|
|
12
|
+
export { type CompletionsPluginContext, type CompletionsPluginOptions, type CompletionsPluginResolvedConfig, type CompletionsPluginUserConfig, type SHELL_TYPES, type ShellType, completionsGenerator, plugin as default, plugin };
|
|
12
13
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.mjs
CHANGED
|
@@ -1,19 +1,6 @@
|
|
|
1
|
-
import {
|
|
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";
|
|
1
|
+
import { t as completionsGenerator } from "./generator-DQoArSbb.mjs";
|
|
14
2
|
import { SHELL_TYPES } from "./types/shell-type.mjs";
|
|
15
|
-
import {
|
|
16
|
-
import { render } from "@powerlines/plugin-alloy/render";
|
|
3
|
+
import { executeCommandGenerator } from "@shell-shock/core/helpers/power-plant";
|
|
17
4
|
import { getAppTitle } from "@shell-shock/core/plugin-utils";
|
|
18
5
|
import { joinPaths } from "@stryke/path/join";
|
|
19
6
|
|
|
@@ -48,242 +35,237 @@ const plugin = (options = {}) => {
|
|
|
48
35
|
entry: { file: joinPaths(this.entryPath, "completions", "index.ts") },
|
|
49
36
|
virtual: true
|
|
50
37
|
});
|
|
51
|
-
if (this.config.completions.shells.includes("bash"))
|
|
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
|
-
|
|
38
|
+
if (this.config.completions.shells.includes("bash")) {
|
|
39
|
+
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.");
|
|
40
|
+
else {
|
|
41
|
+
this.inputs.push({
|
|
42
|
+
id: "completions-bash",
|
|
43
|
+
name: "bash",
|
|
44
|
+
description: `Commands to setup bash completions for the ${getAppTitle(this, true)} command-line interface.`,
|
|
45
|
+
alias: [],
|
|
46
|
+
path: "completions/bash",
|
|
47
|
+
segments: ["completions", "bash"],
|
|
48
|
+
title: "Completions - Bash",
|
|
49
|
+
tags: ["Utility"],
|
|
50
|
+
entry: { file: joinPaths(this.entryPath, "completions", "bash", "index.ts") },
|
|
51
|
+
virtual: true
|
|
52
|
+
});
|
|
53
|
+
this.inputs.push({
|
|
54
|
+
id: "completions-bash-script",
|
|
55
|
+
name: "script",
|
|
56
|
+
description: `Generate a bash completion script for the ${getAppTitle(this, true)} command-line interface.`,
|
|
57
|
+
alias: [],
|
|
58
|
+
path: "completions/bash/script",
|
|
59
|
+
segments: [
|
|
60
|
+
"completions",
|
|
61
|
+
"bash",
|
|
62
|
+
"script"
|
|
63
|
+
],
|
|
64
|
+
title: "Completions - Bash Script",
|
|
65
|
+
tags: ["Utility"],
|
|
66
|
+
entry: {
|
|
67
|
+
file: joinPaths(this.entryPath, "completions", "bash", "script", "index.ts"),
|
|
68
|
+
input: { file: joinPaths(this.entryPath, "completions", "bash", "script", "command.ts") }
|
|
69
|
+
},
|
|
70
|
+
virtual: false
|
|
71
|
+
});
|
|
72
|
+
this.inputs.push({
|
|
73
|
+
id: "completions-bash-config",
|
|
74
|
+
name: "config",
|
|
75
|
+
description: `Update the current system's bash shell configuration to include completions for the ${getAppTitle(this, true)} command-line interface.`,
|
|
76
|
+
alias: [],
|
|
77
|
+
path: "completions/bash/config",
|
|
78
|
+
segments: [
|
|
79
|
+
"completions",
|
|
80
|
+
"bash",
|
|
81
|
+
"config"
|
|
82
|
+
],
|
|
83
|
+
title: "Completions - Bash Configuration",
|
|
84
|
+
tags: ["Utility"],
|
|
85
|
+
entry: {
|
|
86
|
+
file: joinPaths(this.entryPath, "completions", "bash", "config", "index.ts"),
|
|
87
|
+
input: { file: joinPaths(this.entryPath, "completions", "bash", "config", "command.ts") }
|
|
88
|
+
},
|
|
89
|
+
virtual: false
|
|
90
|
+
});
|
|
91
|
+
}
|
|
103
92
|
}
|
|
104
|
-
if (this.config.completions.shells.includes("zsh"))
|
|
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
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
93
|
+
if (this.config.completions.shells.includes("zsh")) {
|
|
94
|
+
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.");
|
|
95
|
+
else {
|
|
96
|
+
this.inputs.push({
|
|
97
|
+
id: "completions-zsh",
|
|
98
|
+
name: "zsh",
|
|
99
|
+
description: `Commands to setup Zsh completions for the ${getAppTitle(this, true)} command-line interface.`,
|
|
100
|
+
alias: [],
|
|
101
|
+
path: "completions/zsh",
|
|
102
|
+
segments: ["completions", "zsh"],
|
|
103
|
+
title: "Completions - Zsh",
|
|
104
|
+
tags: ["Utility"],
|
|
105
|
+
entry: { file: joinPaths(this.entryPath, "completions", "zsh", "index.ts") },
|
|
106
|
+
virtual: true
|
|
107
|
+
});
|
|
108
|
+
this.inputs.push({
|
|
109
|
+
id: "completions-zsh-script",
|
|
110
|
+
name: "script",
|
|
111
|
+
description: `Generate a Zsh completion script for the ${getAppTitle(this, true)} command-line interface.`,
|
|
112
|
+
alias: [],
|
|
113
|
+
path: "completions/zsh/script",
|
|
114
|
+
segments: [
|
|
115
|
+
"completions",
|
|
116
|
+
"zsh",
|
|
117
|
+
"script"
|
|
118
|
+
],
|
|
119
|
+
title: "Completions - Zsh Script",
|
|
120
|
+
tags: ["Utility"],
|
|
121
|
+
entry: {
|
|
122
|
+
file: joinPaths(this.entryPath, "completions", "zsh", "script", "index.ts"),
|
|
123
|
+
input: { file: joinPaths(this.entryPath, "completions", "zsh", "script", "command.ts") }
|
|
124
|
+
},
|
|
125
|
+
virtual: false
|
|
126
|
+
});
|
|
127
|
+
this.inputs.push({
|
|
128
|
+
id: "completions-zsh-config",
|
|
129
|
+
name: "config",
|
|
130
|
+
description: `Update the current system's Zsh shell configuration to include completions for the ${getAppTitle(this, true)} command-line interface.`,
|
|
131
|
+
alias: [],
|
|
132
|
+
path: "completions/zsh/config",
|
|
133
|
+
segments: [
|
|
134
|
+
"completions",
|
|
135
|
+
"zsh",
|
|
136
|
+
"config"
|
|
137
|
+
],
|
|
138
|
+
title: "Completions - Zsh Configuration",
|
|
139
|
+
tags: ["Utility"],
|
|
140
|
+
entry: {
|
|
141
|
+
file: joinPaths(this.entryPath, "completions", "zsh", "config", "index.ts"),
|
|
142
|
+
input: { file: joinPaths(this.entryPath, "completions", "zsh", "config", "command.ts") }
|
|
143
|
+
},
|
|
144
|
+
virtual: false
|
|
145
|
+
});
|
|
146
|
+
}
|
|
156
147
|
}
|
|
157
|
-
if (this.config.completions.shells.includes("powershell"))
|
|
158
|
-
|
|
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
|
-
|
|
148
|
+
if (this.config.completions.shells.includes("powershell")) {
|
|
149
|
+
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.");
|
|
150
|
+
else {
|
|
151
|
+
this.inputs.push({
|
|
152
|
+
id: "completions-powershell",
|
|
153
|
+
name: "powershell",
|
|
154
|
+
description: `Commands to setup PowerShell completions for the ${getAppTitle(this, true)} command-line interface.`,
|
|
155
|
+
alias: [],
|
|
156
|
+
path: "completions/powershell",
|
|
157
|
+
segments: ["completions", "powershell"],
|
|
158
|
+
title: "Completions - PowerShell",
|
|
159
|
+
tags: ["Utility"],
|
|
160
|
+
entry: { file: joinPaths(this.entryPath, "completions", "powershell", "index.ts") },
|
|
161
|
+
virtual: true
|
|
162
|
+
});
|
|
163
|
+
this.inputs.push({
|
|
164
|
+
id: "completions-powershell-script",
|
|
165
|
+
name: "script",
|
|
166
|
+
description: `Generate a PowerShell completion script for the ${getAppTitle(this, true)} command-line interface.`,
|
|
167
|
+
alias: [],
|
|
168
|
+
path: "completions/powershell/script",
|
|
169
|
+
segments: [
|
|
170
|
+
"completions",
|
|
171
|
+
"powershell",
|
|
172
|
+
"script"
|
|
173
|
+
],
|
|
174
|
+
title: "Completions - PowerShell Script",
|
|
175
|
+
tags: ["Utility"],
|
|
176
|
+
entry: {
|
|
177
|
+
file: joinPaths(this.entryPath, "completions", "powershell", "script", "index.ts"),
|
|
178
|
+
input: { file: joinPaths(this.entryPath, "completions", "powershell", "script", "command.ts") }
|
|
179
|
+
},
|
|
180
|
+
virtual: false
|
|
181
|
+
});
|
|
182
|
+
this.inputs.push({
|
|
183
|
+
id: "completions-powershell-config",
|
|
184
|
+
name: "config",
|
|
185
|
+
description: `Update the current system's PowerShell configuration to include completions for the ${getAppTitle(this, true)} command-line interface.`,
|
|
186
|
+
alias: [],
|
|
187
|
+
path: "completions/powershell/config",
|
|
188
|
+
segments: [
|
|
189
|
+
"completions",
|
|
190
|
+
"powershell",
|
|
191
|
+
"config"
|
|
192
|
+
],
|
|
193
|
+
title: "Completions - PowerShell Configuration",
|
|
194
|
+
tags: ["Utility"],
|
|
195
|
+
entry: {
|
|
196
|
+
file: joinPaths(this.entryPath, "completions", "powershell", "config", "index.ts"),
|
|
197
|
+
input: { file: joinPaths(this.entryPath, "completions", "powershell", "config", "command.ts") }
|
|
198
|
+
},
|
|
199
|
+
virtual: false
|
|
200
|
+
});
|
|
201
|
+
}
|
|
209
202
|
}
|
|
210
|
-
if (this.config.completions.shells.includes("fish"))
|
|
211
|
-
|
|
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
|
-
|
|
203
|
+
if (this.config.completions.shells.includes("fish")) {
|
|
204
|
+
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.");
|
|
205
|
+
else {
|
|
206
|
+
this.inputs.push({
|
|
207
|
+
id: "completions-fish",
|
|
208
|
+
name: "fish",
|
|
209
|
+
description: `Commands to setup Fish completions for the ${getAppTitle(this, true)} command-line interface.`,
|
|
210
|
+
alias: [],
|
|
211
|
+
path: "completions/fish",
|
|
212
|
+
segments: ["completions", "fish"],
|
|
213
|
+
title: "Completions - Fish",
|
|
214
|
+
tags: ["Utility"],
|
|
215
|
+
entry: { file: joinPaths(this.entryPath, "completions", "fish", "index.ts") },
|
|
216
|
+
virtual: true
|
|
217
|
+
});
|
|
218
|
+
this.inputs.push({
|
|
219
|
+
id: "completions-fish-script",
|
|
220
|
+
name: "script",
|
|
221
|
+
description: `Generate a Fish completion script for the ${getAppTitle(this, true)} command-line interface.`,
|
|
222
|
+
alias: [],
|
|
223
|
+
path: "completions/fish/script",
|
|
224
|
+
segments: [
|
|
225
|
+
"completions",
|
|
226
|
+
"fish",
|
|
227
|
+
"script"
|
|
228
|
+
],
|
|
229
|
+
title: "Completions - Fish Script",
|
|
230
|
+
tags: ["Utility"],
|
|
231
|
+
entry: {
|
|
232
|
+
file: joinPaths(this.entryPath, "completions", "fish", "script", "index.ts"),
|
|
233
|
+
input: { file: joinPaths(this.entryPath, "completions", "fish", "script", "command.ts") }
|
|
234
|
+
},
|
|
235
|
+
virtual: false
|
|
236
|
+
});
|
|
237
|
+
this.inputs.push({
|
|
238
|
+
id: "completions-fish-config",
|
|
239
|
+
name: "config",
|
|
240
|
+
description: `Update the current system's Fish shell configuration to include completions for the ${getAppTitle(this, true)} command-line interface.`,
|
|
241
|
+
alias: [],
|
|
242
|
+
path: "completions/fish/config",
|
|
243
|
+
segments: [
|
|
244
|
+
"completions",
|
|
245
|
+
"fish",
|
|
246
|
+
"config"
|
|
247
|
+
],
|
|
248
|
+
title: "Completions - Fish Configuration",
|
|
249
|
+
tags: ["Utility"],
|
|
250
|
+
entry: {
|
|
251
|
+
file: joinPaths(this.entryPath, "completions", "fish", "config", "index.ts"),
|
|
252
|
+
input: { file: joinPaths(this.entryPath, "completions", "fish", "config", "command.ts") }
|
|
253
|
+
},
|
|
254
|
+
virtual: false
|
|
255
|
+
});
|
|
256
|
+
}
|
|
262
257
|
}
|
|
263
258
|
},
|
|
264
259
|
prepare: {
|
|
265
260
|
order: "pre",
|
|
266
261
|
async handler() {
|
|
267
|
-
this.debug("Rendering command handling modules for the Shell Shock `completions` plugin.");
|
|
268
|
-
return
|
|
269
|
-
createComponent(BashCompletionsShared, {}),
|
|
270
|
-
createComponent(BashScriptCompletionsCommand, {}),
|
|
271
|
-
createComponent(BashConfigCompletionsCommand, {}),
|
|
272
|
-
createComponent(ZshCompletionsShared, {}),
|
|
273
|
-
createComponent(ZshScriptCompletionsCommand, {}),
|
|
274
|
-
createComponent(ZshConfigCompletionsCommand, {}),
|
|
275
|
-
createComponent(PowerShellCompletionsShared, {}),
|
|
276
|
-
createComponent(PowerShellScriptCompletionsCommand, {}),
|
|
277
|
-
createComponent(PowerShellConfigCompletionsCommand, {}),
|
|
278
|
-
createComponent(FishCompletionsShared, {}),
|
|
279
|
-
createComponent(FishScriptCompletionsCommand, {}),
|
|
280
|
-
createComponent(FishConfigCompletionsCommand, {})
|
|
281
|
-
]);
|
|
262
|
+
this.debug("Rendering command handling modules via Power Plant for the Shell Shock `completions` plugin.");
|
|
263
|
+
return executeCommandGenerator(this, completionsGenerator);
|
|
282
264
|
}
|
|
283
265
|
}
|
|
284
266
|
};
|
|
285
267
|
};
|
|
286
268
|
|
|
287
269
|
//#endregion
|
|
288
|
-
export { plugin as default, plugin };
|
|
270
|
+
export { completionsGenerator, plugin as default, plugin };
|
|
289
271
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shell-type-DETq6QwA.d.cts","names":[],"sources":["../src/types/shell-type.ts"],"mappings":";KAkBY;cAEC,sBAAsB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shell-type-DETq6QwA.d.mts","names":[],"sources":["../src/types/shell-type.ts"],"mappings":""}
|
package/dist/types/index.cjs
CHANGED
package/dist/types/index.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as ShellType, t as SHELL_TYPES } from "../shell-type-DETq6QwA.cjs";
|
|
2
2
|
import { CompletionsPluginContext, CompletionsPluginOptions, CompletionsPluginResolvedConfig, CompletionsPluginUserConfig } from "./plugin.cjs";
|
|
3
3
|
export { CompletionsPluginContext, CompletionsPluginOptions, CompletionsPluginResolvedConfig, CompletionsPluginUserConfig, SHELL_TYPES, ShellType };
|
package/dist/types/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as ShellType, t as SHELL_TYPES } from "../shell-type-DETq6QwA.mjs";
|
|
2
2
|
import { CompletionsPluginContext, CompletionsPluginOptions, CompletionsPluginResolvedConfig, CompletionsPluginUserConfig } from "./plugin.mjs";
|
|
3
3
|
export { CompletionsPluginContext, CompletionsPluginOptions, CompletionsPluginResolvedConfig, CompletionsPluginUserConfig, SHELL_TYPES, ShellType };
|
package/dist/types/index.mjs
CHANGED
package/dist/types/plugin.d.cts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { ShellType } from "
|
|
1
|
+
import { n as ShellType } from "../shell-type-DETq6QwA.cjs";
|
|
2
2
|
import { ResolvedConfig, UserConfig } from "@shell-shock/core/types/config";
|
|
3
3
|
import { Context } from "@shell-shock/core/types/context";
|
|
4
|
-
|
|
5
4
|
//#region src/types/plugin.d.ts
|
|
6
5
|
interface CompletionsPluginOptions {
|
|
7
6
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;UAyBiB;;;;;;;;;;;EAWf,SAAS;;KAGC,8BAA8B;;;;EAIxC,aAAa,SAAS;;KAGZ,kCAAkC;;;;EAI5C,aAAa,SAAS;;KAGZ,yBACV,wBAAwB,kCACtB,mCACA,QAAQ"}
|
package/dist/types/plugin.d.mts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { ShellType } from "
|
|
1
|
+
import { n as ShellType } from "../shell-type-DETq6QwA.mjs";
|
|
2
2
|
import { ResolvedConfig, UserConfig } from "@shell-shock/core/types/config";
|
|
3
3
|
import { Context } from "@shell-shock/core/types/context";
|
|
4
|
-
|
|
5
4
|
//#region src/types/plugin.d.ts
|
|
6
5
|
interface CompletionsPluginOptions {
|
|
7
6
|
/**
|
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
declare const SHELL_TYPES: readonly ShellType[];
|
|
4
|
-
//#endregion
|
|
5
|
-
export { SHELL_TYPES, ShellType };
|
|
6
|
-
//# sourceMappingURL=shell-type.d.cts.map
|
|
1
|
+
import { n as ShellType, t as SHELL_TYPES } from "../shell-type-DETq6QwA.cjs";
|
|
2
|
+
export { SHELL_TYPES, ShellType };
|