@shell-shock/plugin-completions 0.2.23 → 0.3.0

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.
Files changed (133) hide show
  1. package/README.md +1 -1
  2. package/dist/components/bash-config-command.cjs +132 -0
  3. package/dist/components/bash-config-command.d.cts +10 -0
  4. package/dist/components/bash-config-command.d.cts.map +1 -0
  5. package/dist/components/bash-config-command.d.mts +10 -0
  6. package/dist/components/bash-config-command.d.mts.map +1 -0
  7. package/dist/components/bash-config-command.mjs +132 -0
  8. package/dist/components/bash-config-command.mjs.map +1 -0
  9. package/dist/components/bash-script-command.cjs +106 -0
  10. package/dist/components/bash-script-command.d.cts +10 -0
  11. package/dist/components/bash-script-command.d.cts.map +1 -0
  12. package/dist/components/bash-script-command.d.mts +10 -0
  13. package/dist/components/bash-script-command.d.mts.map +1 -0
  14. package/dist/components/bash-script-command.mjs +106 -0
  15. package/dist/components/bash-script-command.mjs.map +1 -0
  16. package/dist/components/bash-shared.cjs +172 -0
  17. package/dist/components/bash-shared.d.cts +10 -0
  18. package/dist/components/bash-shared.d.cts.map +1 -0
  19. package/dist/components/bash-shared.d.mts +10 -0
  20. package/dist/components/bash-shared.d.mts.map +1 -0
  21. package/dist/components/bash-shared.mjs +172 -0
  22. package/dist/components/bash-shared.mjs.map +1 -0
  23. package/dist/components/fish-config-command.cjs +132 -0
  24. package/dist/components/fish-config-command.d.cts +10 -0
  25. package/dist/components/fish-config-command.d.cts.map +1 -0
  26. package/dist/components/fish-config-command.d.mts +10 -0
  27. package/dist/components/fish-config-command.d.mts.map +1 -0
  28. package/dist/components/fish-config-command.mjs +132 -0
  29. package/dist/components/fish-config-command.mjs.map +1 -0
  30. package/dist/components/fish-script-command.cjs +106 -0
  31. package/dist/components/fish-script-command.d.cts +10 -0
  32. package/dist/components/fish-script-command.d.cts.map +1 -0
  33. package/dist/components/fish-script-command.d.mts +10 -0
  34. package/dist/components/fish-script-command.d.mts.map +1 -0
  35. package/dist/components/fish-script-command.mjs +106 -0
  36. package/dist/components/fish-script-command.mjs.map +1 -0
  37. package/dist/components/fish-shared.cjs +303 -0
  38. package/dist/components/fish-shared.d.cts +10 -0
  39. package/dist/components/fish-shared.d.cts.map +1 -0
  40. package/dist/components/fish-shared.d.mts +10 -0
  41. package/dist/components/fish-shared.d.mts.map +1 -0
  42. package/dist/components/fish-shared.mjs +303 -0
  43. package/dist/components/fish-shared.mjs.map +1 -0
  44. package/dist/components/index.cjs +24 -8
  45. package/dist/components/index.d.cts +13 -5
  46. package/dist/components/index.d.mts +13 -5
  47. package/dist/components/index.mjs +13 -5
  48. package/dist/components/powershell-config-command.cjs +128 -0
  49. package/dist/components/powershell-config-command.d.cts +7 -0
  50. package/dist/components/powershell-config-command.d.cts.map +1 -0
  51. package/dist/components/powershell-config-command.d.mts +7 -0
  52. package/dist/components/powershell-config-command.d.mts.map +1 -0
  53. package/dist/components/powershell-config-command.mjs +128 -0
  54. package/dist/components/powershell-config-command.mjs.map +1 -0
  55. package/dist/components/powershell-script-command.cjs +106 -0
  56. package/dist/components/powershell-script-command.d.cts +10 -0
  57. package/dist/components/powershell-script-command.d.cts.map +1 -0
  58. package/dist/components/powershell-script-command.d.mts +10 -0
  59. package/dist/components/powershell-script-command.d.mts.map +1 -0
  60. package/dist/components/powershell-script-command.mjs +106 -0
  61. package/dist/components/powershell-script-command.mjs.map +1 -0
  62. package/dist/components/powershell-shared.cjs +319 -0
  63. package/dist/components/powershell-shared.d.cts +10 -0
  64. package/dist/components/powershell-shared.d.cts.map +1 -0
  65. package/dist/components/powershell-shared.d.mts +10 -0
  66. package/dist/components/powershell-shared.d.mts.map +1 -0
  67. package/dist/components/{powershell-command.mjs → powershell-shared.mjs} +81 -181
  68. package/dist/components/powershell-shared.mjs.map +1 -0
  69. package/dist/components/zsh-config-command.cjs +132 -0
  70. package/dist/components/zsh-config-command.d.cts +10 -0
  71. package/dist/components/zsh-config-command.d.cts.map +1 -0
  72. package/dist/components/zsh-config-command.d.mts +10 -0
  73. package/dist/components/zsh-config-command.d.mts.map +1 -0
  74. package/dist/components/zsh-config-command.mjs +132 -0
  75. package/dist/components/zsh-config-command.mjs.map +1 -0
  76. package/dist/components/zsh-script-command.cjs +111 -0
  77. package/dist/components/zsh-script-command.d.cts +10 -0
  78. package/dist/components/zsh-script-command.d.cts.map +1 -0
  79. package/dist/components/zsh-script-command.d.mts +10 -0
  80. package/dist/components/zsh-script-command.d.mts.map +1 -0
  81. package/dist/components/zsh-script-command.mjs +111 -0
  82. package/dist/components/zsh-script-command.mjs.map +1 -0
  83. package/dist/components/zsh-shared.cjs +281 -0
  84. package/dist/components/zsh-shared.d.cts +10 -0
  85. package/dist/components/zsh-shared.d.cts.map +1 -0
  86. package/dist/components/zsh-shared.d.mts +10 -0
  87. package/dist/components/zsh-shared.d.mts.map +1 -0
  88. package/dist/components/zsh-shared.mjs +281 -0
  89. package/dist/components/zsh-shared.mjs.map +1 -0
  90. package/dist/helpers/complete-command.cjs +2 -7
  91. package/dist/helpers/complete-command.d.cts +2 -2
  92. package/dist/helpers/complete-command.d.cts.map +1 -1
  93. package/dist/helpers/complete-command.d.mts +2 -2
  94. package/dist/helpers/complete-command.d.mts.map +1 -1
  95. package/dist/helpers/complete-command.mjs +2 -7
  96. package/dist/helpers/complete-command.mjs.map +1 -1
  97. package/dist/helpers/index.cjs +1 -1
  98. package/dist/helpers/index.d.cts +2 -2
  99. package/dist/helpers/index.d.mts +2 -2
  100. package/dist/helpers/index.mjs +2 -2
  101. package/dist/index.cjs +245 -59
  102. package/dist/index.d.cts.map +1 -1
  103. package/dist/index.d.mts.map +1 -1
  104. package/dist/index.mjs +246 -60
  105. package/dist/index.mjs.map +1 -1
  106. package/package.json +148 -37
  107. package/dist/components/bash-command.cjs +0 -273
  108. package/dist/components/bash-command.d.cts +0 -10
  109. package/dist/components/bash-command.d.cts.map +0 -1
  110. package/dist/components/bash-command.d.mts +0 -10
  111. package/dist/components/bash-command.d.mts.map +0 -1
  112. package/dist/components/bash-command.mjs +0 -273
  113. package/dist/components/bash-command.mjs.map +0 -1
  114. package/dist/components/fish-command.cjs +0 -403
  115. package/dist/components/fish-command.d.cts +0 -10
  116. package/dist/components/fish-command.d.cts.map +0 -1
  117. package/dist/components/fish-command.d.mts +0 -10
  118. package/dist/components/fish-command.d.mts.map +0 -1
  119. package/dist/components/fish-command.mjs +0 -403
  120. package/dist/components/fish-command.mjs.map +0 -1
  121. package/dist/components/powershell-command.cjs +0 -419
  122. package/dist/components/powershell-command.d.cts +0 -10
  123. package/dist/components/powershell-command.d.cts.map +0 -1
  124. package/dist/components/powershell-command.d.mts +0 -10
  125. package/dist/components/powershell-command.d.mts.map +0 -1
  126. package/dist/components/powershell-command.mjs.map +0 -1
  127. package/dist/components/zsh-command.cjs +0 -384
  128. package/dist/components/zsh-command.d.cts +0 -10
  129. package/dist/components/zsh-command.d.cts.map +0 -1
  130. package/dist/components/zsh-command.d.mts +0 -10
  131. package/dist/components/zsh-command.d.mts.map +0 -1
  132. package/dist/components/zsh-command.mjs +0 -384
  133. package/dist/components/zsh-command.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"complete-command.d.mts","names":[],"sources":["../../src/helpers/complete-command.ts"],"mappings":";cA4Ba,IAAA"}
1
+ {"version":3,"file":"complete-command.d.mts","names":[],"sources":["../../src/helpers/complete-command.ts"],"mappings":";cAsBa,YAAA"}
@@ -2,13 +2,8 @@
2
2
  function quoteIfNeeded(path) {
3
3
  return path.includes(" ") ? `'${path}'` : path;
4
4
  }
5
- const execPath = process.execPath;
6
- const processArgs = process.argv.slice(1);
7
- const quotedExecPath = quoteIfNeeded(execPath);
8
- const quotedProcessArgs = processArgs.map(quoteIfNeeded);
9
- const quotedProcessExecArgs = process.execArgv.map(quoteIfNeeded);
10
- const exec = `${quotedExecPath} ${quotedProcessExecArgs.join(" ")} ${quotedProcessArgs[0]}`;
5
+ const EXEC_COMMAND = `${quoteIfNeeded(process.execPath)} ${process.execArgv.map(quoteIfNeeded).join(" ")} ${process.argv.slice(1).map(quoteIfNeeded)[0]}`;
11
6
 
12
7
  //#endregion
13
- export { exec };
8
+ export { EXEC_COMMAND };
14
9
  //# sourceMappingURL=complete-command.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"complete-command.mjs","names":[],"sources":["../../src/helpers/complete-command.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nfunction quoteIfNeeded(path: string): string {\n return path.includes(\" \") ? `'${path}'` : path;\n}\n\nconst execPath = process.execPath;\nconst processArgs = process.argv.slice(1);\nconst quotedExecPath = quoteIfNeeded(execPath);\nconst quotedProcessArgs = processArgs.map(quoteIfNeeded);\nconst quotedProcessExecArgs = process.execArgv.map(quoteIfNeeded);\n\nexport const exec = `${quotedExecPath} ${quotedProcessExecArgs.join(\" \")} ${\n quotedProcessArgs[0]\n}`;\n"],"mappings":";AAkBA,SAAS,cAAc,MAAsB;AAC3C,QAAO,KAAK,SAAS,IAAI,GAAG,IAAI,KAAK,KAAK;;AAG5C,MAAM,WAAW,QAAQ;AACzB,MAAM,cAAc,QAAQ,KAAK,MAAM,EAAE;AACzC,MAAM,iBAAiB,cAAc,SAAS;AAC9C,MAAM,oBAAoB,YAAY,IAAI,cAAc;AACxD,MAAM,wBAAwB,QAAQ,SAAS,IAAI,cAAc;AAEjE,MAAa,OAAO,GAAG,eAAe,GAAG,sBAAsB,KAAK,IAAI,CAAC,GACvE,kBAAkB"}
1
+ {"version":3,"file":"complete-command.mjs","names":[],"sources":["../../src/helpers/complete-command.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nfunction quoteIfNeeded(path: string): string {\n return path.includes(\" \") ? `'${path}'` : path;\n}\n\nexport const EXEC_COMMAND = `${quoteIfNeeded(process.execPath)} ${process.execArgv\n .map(quoteIfNeeded)\n .join(\" \")} ${process.argv.slice(1).map(quoteIfNeeded)[0]}`;\n"],"mappings":";AAkBA,SAAS,cAAc,MAAsB;AAC3C,QAAO,KAAK,SAAS,IAAI,GAAG,IAAI,KAAK,KAAK;;AAG5C,MAAa,eAAe,GAAG,cAAc,QAAQ,SAAS,CAAC,GAAG,QAAQ,SACvE,IAAI,cAAc,CAClB,KAAK,IAAI,CAAC,GAAG,QAAQ,KAAK,MAAM,EAAE,CAAC,IAAI,cAAc,CAAC"}
@@ -3,4 +3,4 @@ const require_helpers_complete_command = require('./complete-command.cjs');
3
3
  const require_helpers_completion_directive_constants = require('./completion-directive-constants.cjs');
4
4
 
5
5
  exports.CompletionDirective = require_helpers_completion_directive_constants.CompletionDirective;
6
- exports.exec = require_helpers_complete_command.exec;
6
+ exports.EXEC_COMMAND = require_helpers_complete_command.EXEC_COMMAND;
@@ -1,3 +1,3 @@
1
- import { exec } from "./complete-command.cjs";
1
+ import { EXEC_COMMAND } from "./complete-command.cjs";
2
2
  import { CompletionDirective } from "./completion-directive-constants.cjs";
3
- export { CompletionDirective, exec };
3
+ export { CompletionDirective, EXEC_COMMAND };
@@ -1,3 +1,3 @@
1
- import { exec } from "./complete-command.mjs";
1
+ import { EXEC_COMMAND } from "./complete-command.mjs";
2
2
  import { CompletionDirective } from "./completion-directive-constants.mjs";
3
- export { CompletionDirective, exec };
3
+ export { CompletionDirective, EXEC_COMMAND };
@@ -1,4 +1,4 @@
1
- import { exec } from "./complete-command.mjs";
1
+ import { EXEC_COMMAND } from "./complete-command.mjs";
2
2
  import { CompletionDirective } from "./completion-directive-constants.mjs";
3
3
 
4
- export { CompletionDirective, exec };
4
+ export { CompletionDirective, EXEC_COMMAND };
package/dist/index.cjs CHANGED
@@ -1,14 +1,21 @@
1
1
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
2
- const require_components_bash_command = require('./components/bash-command.cjs');
3
- const require_components_fish_command = require('./components/fish-command.cjs');
4
- const require_components_powershell_command = require('./components/powershell-command.cjs');
5
- const require_components_zsh_command = require('./components/zsh-command.cjs');
2
+ const require_components_bash_config_command = require('./components/bash-config-command.cjs');
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');
6
14
  require('./components/index.cjs');
7
15
  const require_types_shell_type = require('./types/shell-type.cjs');
8
16
  let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
9
17
  let _powerlines_plugin_alloy_render = require("@powerlines/plugin-alloy/render");
10
18
  let _shell_shock_core_plugin_utils = require("@shell-shock/core/plugin-utils");
11
- let _stryke_path = require("@stryke/path");
12
19
  let _stryke_path_join = require("@stryke/path/join");
13
20
 
14
21
  //#region src/index.tsx
@@ -21,7 +28,7 @@ const plugin = (options = {}) => {
21
28
  config() {
22
29
  this.debug("Providing default configuration for the Shell Shock `completions` plugin.");
23
30
  return { completions: {
24
- shells: require_types_shell_type.SHELL_TYPES,
31
+ shells: [...require_types_shell_type.SHELL_TYPES],
25
32
  ...options
26
33
  } };
27
34
  },
@@ -36,67 +43,246 @@ const plugin = (options = {}) => {
36
43
  path: "completions",
37
44
  segments: ["completions"],
38
45
  title: "CLI Completions",
46
+ tags: ["Utility"],
39
47
  description: `Commands for generating shell completion scripts for ${(0, _shell_shock_core_plugin_utils.getAppTitle)(this)}.`,
40
- entry: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "command.ts") },
48
+ entry: {
49
+ file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "index.ts"),
50
+ input: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "command.ts") }
51
+ },
41
52
  isVirtual: true
42
53
  });
43
54
  if (this.config.completions.shells.includes("bash")) 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.");
44
- else this.inputs.push({
45
- id: "completions-bash",
46
- name: "bash",
47
- description: `Generate a Bash completion script for the ${(0, _shell_shock_core_plugin_utils.getAppTitle)(this, true)} command-line interface.`,
48
- alias: [],
49
- path: "completions/bash",
50
- segments: ["completions", "bash"],
51
- title: "CLI Completions - Bash Shell",
52
- entry: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "bash", "command.ts") },
53
- isVirtual: false
54
- });
55
+ else {
56
+ this.inputs.push({
57
+ id: "completions-bash",
58
+ name: "bash",
59
+ description: `Commands to setup bash completions for the ${(0, _shell_shock_core_plugin_utils.getAppTitle)(this, true)} command-line interface.`,
60
+ alias: [],
61
+ path: "completions/bash",
62
+ segments: ["completions", "bash"],
63
+ title: "Completions - Bash",
64
+ tags: ["Utility"],
65
+ entry: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "bash", "index.ts") },
66
+ isVirtual: true
67
+ });
68
+ this.inputs.push({
69
+ id: "completions-bash-script",
70
+ name: "script",
71
+ description: `Generate a bash completion script for the ${(0, _shell_shock_core_plugin_utils.getAppTitle)(this, true)} command-line interface.`,
72
+ alias: [],
73
+ path: "completions/bash/script",
74
+ segments: [
75
+ "completions",
76
+ "bash",
77
+ "script"
78
+ ],
79
+ title: "Completions - Bash Script",
80
+ tags: ["Utility"],
81
+ entry: {
82
+ file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "bash", "script", "index.ts"),
83
+ input: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "bash", "script", "command.ts") }
84
+ },
85
+ isVirtual: false
86
+ });
87
+ this.inputs.push({
88
+ id: "completions-bash-config",
89
+ name: "config",
90
+ 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.`,
91
+ alias: [],
92
+ path: "completions/bash/config",
93
+ segments: [
94
+ "completions",
95
+ "bash",
96
+ "config"
97
+ ],
98
+ title: "Completions - Bash Configuration",
99
+ tags: ["Utility"],
100
+ entry: {
101
+ file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "bash", "config", "index.ts"),
102
+ input: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "bash", "config", "command.ts") }
103
+ },
104
+ isVirtual: false
105
+ });
106
+ }
55
107
  if (this.config.completions.shells.includes("zsh")) 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.");
56
- else this.inputs.push({
57
- id: "completions-zsh",
58
- name: "zsh",
59
- description: `Generate a Zsh completion script for the ${(0, _shell_shock_core_plugin_utils.getAppTitle)(this, true)} command-line interface.`,
60
- alias: [],
61
- path: "completions/zsh",
62
- segments: ["completions", "zsh"],
63
- title: "CLI Completions - Zsh Shell",
64
- entry: { file: (0, _stryke_path.relativePath)(this.commandsPath, (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "zsh", "command.ts")) },
65
- isVirtual: false
66
- });
108
+ else {
109
+ this.inputs.push({
110
+ id: "completions-zsh",
111
+ name: "zsh",
112
+ description: `Commands to setup Zsh completions for the ${(0, _shell_shock_core_plugin_utils.getAppTitle)(this, true)} command-line interface.`,
113
+ alias: [],
114
+ path: "completions/zsh",
115
+ segments: ["completions", "zsh"],
116
+ title: "Completions - Zsh",
117
+ tags: ["Utility"],
118
+ entry: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "zsh", "index.ts") },
119
+ isVirtual: true
120
+ });
121
+ this.inputs.push({
122
+ id: "completions-zsh-script",
123
+ name: "script",
124
+ description: `Generate a Zsh completion script for the ${(0, _shell_shock_core_plugin_utils.getAppTitle)(this, true)} command-line interface.`,
125
+ alias: [],
126
+ path: "completions/zsh/script",
127
+ segments: [
128
+ "completions",
129
+ "zsh",
130
+ "script"
131
+ ],
132
+ title: "Completions - Zsh Script",
133
+ tags: ["Utility"],
134
+ entry: {
135
+ file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "zsh", "script", "index.ts"),
136
+ input: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "zsh", "script", "command.ts") }
137
+ },
138
+ isVirtual: false
139
+ });
140
+ this.inputs.push({
141
+ id: "completions-zsh-config",
142
+ name: "config",
143
+ 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.`,
144
+ alias: [],
145
+ path: "completions/zsh/config",
146
+ segments: [
147
+ "completions",
148
+ "zsh",
149
+ "config"
150
+ ],
151
+ title: "Completions - Zsh Configuration",
152
+ tags: ["Utility"],
153
+ entry: {
154
+ file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "zsh", "config", "index.ts"),
155
+ input: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "zsh", "config", "command.ts") }
156
+ },
157
+ isVirtual: false
158
+ });
159
+ }
67
160
  if (this.config.completions.shells.includes("powershell")) 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.");
68
- else this.inputs.push({
69
- id: "completions-powershell",
70
- name: "powershell",
71
- description: `Generate a PowerShell completion script for the ${(0, _shell_shock_core_plugin_utils.getAppTitle)(this, true)} command-line interface.`,
72
- alias: [],
73
- path: "completions/powershell",
74
- segments: ["completions", "powershell"],
75
- title: "CLI Completions - PowerShell",
76
- entry: { file: (0, _stryke_path.relativePath)(this.commandsPath, (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "powershell", "command.ts")) },
77
- isVirtual: false
78
- });
161
+ else {
162
+ this.inputs.push({
163
+ id: "completions-powershell",
164
+ name: "powershell",
165
+ description: `Commands to setup PowerShell completions for the ${(0, _shell_shock_core_plugin_utils.getAppTitle)(this, true)} command-line interface.`,
166
+ alias: [],
167
+ path: "completions/powershell",
168
+ segments: ["completions", "powershell"],
169
+ title: "Completions - PowerShell",
170
+ tags: ["Utility"],
171
+ entry: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "powershell", "index.ts") },
172
+ isVirtual: true
173
+ });
174
+ this.inputs.push({
175
+ id: "completions-powershell-script",
176
+ name: "script",
177
+ description: `Generate a PowerShell completion script for the ${(0, _shell_shock_core_plugin_utils.getAppTitle)(this, true)} command-line interface.`,
178
+ alias: [],
179
+ path: "completions/powershell/script",
180
+ segments: [
181
+ "completions",
182
+ "powershell",
183
+ "script"
184
+ ],
185
+ title: "Completions - PowerShell Script",
186
+ tags: ["Utility"],
187
+ entry: {
188
+ file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "powershell", "script", "index.ts"),
189
+ input: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "powershell", "script", "command.ts") }
190
+ },
191
+ isVirtual: false
192
+ });
193
+ this.inputs.push({
194
+ id: "completions-powershell-config",
195
+ name: "config",
196
+ 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.`,
197
+ alias: [],
198
+ path: "completions/powershell/config",
199
+ segments: [
200
+ "completions",
201
+ "powershell",
202
+ "config"
203
+ ],
204
+ title: "Completions - PowerShell Configuration",
205
+ tags: ["Utility"],
206
+ entry: {
207
+ file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "powershell", "config", "index.ts"),
208
+ input: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "powershell", "config", "command.ts") }
209
+ },
210
+ isVirtual: false
211
+ });
212
+ }
79
213
  if (this.config.completions.shells.includes("fish")) 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.");
80
- else this.inputs.push({
81
- id: "completions-fish",
82
- name: "fish",
83
- description: `Generate a Fish completion script for the ${(0, _shell_shock_core_plugin_utils.getAppTitle)(this, true)} command-line interface.`,
84
- alias: [],
85
- path: "completions/fish",
86
- segments: ["completions", "fish"],
87
- title: "CLI Completions - Fish Shell",
88
- entry: { file: (0, _stryke_path.relativePath)(this.commandsPath, (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "fish", "command.ts")) },
89
- isVirtual: false
90
- });
214
+ else {
215
+ this.inputs.push({
216
+ id: "completions-fish",
217
+ name: "fish",
218
+ description: `Commands to setup Fish completions for the ${(0, _shell_shock_core_plugin_utils.getAppTitle)(this, true)} command-line interface.`,
219
+ alias: [],
220
+ path: "completions/fish",
221
+ segments: ["completions", "fish"],
222
+ title: "Completions - Fish",
223
+ tags: ["Utility"],
224
+ entry: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "fish", "index.ts") },
225
+ isVirtual: true
226
+ });
227
+ this.inputs.push({
228
+ id: "completions-fish-script",
229
+ name: "script",
230
+ description: `Generate a Fish completion script for the ${(0, _shell_shock_core_plugin_utils.getAppTitle)(this, true)} command-line interface.`,
231
+ alias: [],
232
+ path: "completions/fish/script",
233
+ segments: [
234
+ "completions",
235
+ "fish",
236
+ "script"
237
+ ],
238
+ title: "Completions - Fish Script",
239
+ tags: ["Utility"],
240
+ entry: {
241
+ file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "fish", "script", "index.ts"),
242
+ input: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "fish", "script", "command.ts") }
243
+ },
244
+ isVirtual: false
245
+ });
246
+ this.inputs.push({
247
+ id: "completions-fish-config",
248
+ name: "config",
249
+ 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.`,
250
+ alias: [],
251
+ path: "completions/fish/config",
252
+ segments: [
253
+ "completions",
254
+ "fish",
255
+ "config"
256
+ ],
257
+ title: "Completions - Fish Configuration",
258
+ tags: ["Utility"],
259
+ entry: {
260
+ file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "fish", "config", "index.ts"),
261
+ input: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "fish", "config", "command.ts") }
262
+ },
263
+ isVirtual: false
264
+ });
265
+ }
91
266
  },
92
- async prepare() {
93
- this.debug("Rendering command handling modules for the Shell Shock `completions` plugin.");
94
- return (0, _powerlines_plugin_alloy_render.render)(this, [
95
- (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_bash_command.BashCompletionsCommand, {}),
96
- (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_zsh_command.ZshCompletionsCommand, {}),
97
- (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_powershell_command.PowerShellCompletionsCommand, {}),
98
- (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_fish_command.FishCompletionsCommand, {})
99
- ]);
267
+ prepare: {
268
+ order: "pre",
269
+ async handler() {
270
+ this.debug("Rendering command handling modules for the Shell Shock `completions` plugin.");
271
+ return (0, _powerlines_plugin_alloy_render.render)(this, [
272
+ (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_bash_shared.BashCompletionsShared, {}),
273
+ (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_bash_script_command.BashScriptCompletionsCommand, {}),
274
+ (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_bash_config_command.BashConfigCompletionsCommand, {}),
275
+ (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_zsh_shared.ZshCompletionsShared, {}),
276
+ (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_zsh_script_command.ZshScriptCompletionsCommand, {}),
277
+ (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_zsh_config_command.ZshConfigCompletionsCommand, {}),
278
+ (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_powershell_shared.PowerShellCompletionsShared, {}),
279
+ (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_powershell_script_command.PowerShellScriptCompletionsCommand, {}),
280
+ (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_powershell_config_command.PowerShellConfigCompletionsCommand, {}),
281
+ (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_fish_shared.FishCompletionsShared, {}),
282
+ (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_fish_script_command.FishScriptCompletionsCommand, {}),
283
+ (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_fish_config_command.FishConfigCompletionsCommand, {})
284
+ ]);
285
+ }
100
286
  }
101
287
  }];
102
288
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.tsx"],"mappings":";;;;;;;;cAwCa,MAAA,oBACM,wBAAA,GAA2B,wBAAA,EAE5C,OAAA,GAAS,wBAAA,KACR,MAAA,CAAO,QAAA"}
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.tsx"],"mappings":";;;;;;;;cA+Ca,MAAA,oBACM,wBAAA,GAA2B,wBAAA,EAE5C,OAAA,GAAS,wBAAA,KACR,MAAA,CAAO,QAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.tsx"],"mappings":";;;;;;;;cAwCa,MAAA,oBACM,wBAAA,GAA2B,wBAAA,EAE5C,OAAA,GAAS,wBAAA,KACR,MAAA,CAAO,QAAA"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.tsx"],"mappings":";;;;;;;;cA+Ca,MAAA,oBACM,wBAAA,GAA2B,wBAAA,EAE5C,OAAA,GAAS,wBAAA,KACR,MAAA,CAAO,QAAA"}