@shell-shock/plugin-completions 0.4.16 → 0.4.18

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 (56) hide show
  1. package/dist/components/bash-config-command.cjs +120 -6
  2. package/dist/components/bash-config-command.mjs +119 -6
  3. package/dist/components/bash-config-command.mjs.map +1 -1
  4. package/dist/components/bash-script-command.cjs +105 -5
  5. package/dist/components/bash-script-command.mjs +104 -5
  6. package/dist/components/bash-script-command.mjs.map +1 -1
  7. package/dist/components/bash-shared.cjs +77 -13
  8. package/dist/components/bash-shared.mjs +76 -13
  9. package/dist/components/bash-shared.mjs.map +1 -1
  10. package/dist/components/fish-config-command.cjs +120 -6
  11. package/dist/components/fish-config-command.mjs +119 -6
  12. package/dist/components/fish-config-command.mjs.map +1 -1
  13. package/dist/components/fish-script-command.cjs +104 -4
  14. package/dist/components/fish-script-command.mjs +103 -4
  15. package/dist/components/fish-script-command.mjs.map +1 -1
  16. package/dist/components/fish-shared.cjs +141 -77
  17. package/dist/components/fish-shared.mjs +140 -77
  18. package/dist/components/fish-shared.mjs.map +1 -1
  19. package/dist/components/index.cjs +26 -1
  20. package/dist/components/index.mjs +14 -1
  21. package/dist/components/powershell-config-command.cjs +116 -6
  22. package/dist/components/powershell-config-command.mjs +115 -6
  23. package/dist/components/powershell-config-command.mjs.map +1 -1
  24. package/dist/components/powershell-script-command.cjs +104 -4
  25. package/dist/components/powershell-script-command.mjs +103 -4
  26. package/dist/components/powershell-script-command.mjs.map +1 -1
  27. package/dist/components/powershell-shared.cjs +101 -37
  28. package/dist/components/powershell-shared.mjs +100 -37
  29. package/dist/components/powershell-shared.mjs.map +1 -1
  30. package/dist/components/zsh-config-command.cjs +120 -6
  31. package/dist/components/zsh-config-command.mjs +119 -6
  32. package/dist/components/zsh-config-command.mjs.map +1 -1
  33. package/dist/components/zsh-script-command.cjs +108 -6
  34. package/dist/components/zsh-script-command.mjs +107 -6
  35. package/dist/components/zsh-script-command.mjs.map +1 -1
  36. package/dist/components/zsh-shared.cjs +106 -42
  37. package/dist/components/zsh-shared.mjs +105 -42
  38. package/dist/components/zsh-shared.mjs.map +1 -1
  39. package/dist/helpers/complete-command.cjs +10 -1
  40. package/dist/helpers/complete-command.mjs +8 -1
  41. package/dist/helpers/complete-command.mjs.map +1 -1
  42. package/dist/helpers/completion-directive-constants.cjs +16 -1
  43. package/dist/helpers/completion-directive-constants.mjs +14 -1
  44. package/dist/helpers/completion-directive-constants.mjs.map +1 -1
  45. package/dist/helpers/index.cjs +6 -1
  46. package/dist/helpers/index.mjs +4 -1
  47. package/dist/index.cjs +303 -1
  48. package/dist/index.mjs +301 -1
  49. package/dist/index.mjs.map +1 -1
  50. package/dist/types/index.cjs +4 -1
  51. package/dist/types/index.mjs +3 -1
  52. package/dist/types/plugin.mjs +1 -1
  53. package/dist/types/shell-type.cjs +12 -1
  54. package/dist/types/shell-type.mjs +10 -1
  55. package/dist/types/shell-type.mjs.map +1 -1
  56. package/package.json +10 -10
@@ -1,25 +1,73 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../helpers/complete-command.cjs`),t=require(`../helpers/completion-directive-constants.cjs`);require(`../helpers/index.cjs`);let n=require(`@alloy-js/core/jsx-runtime`),r=require(`@shell-shock/core/plugin-utils`),i=require(`@alloy-js/core`),a=require(`@alloy-js/typescript`),o=require(`@powerlines/plugin-alloy/core`),s=require(`@powerlines/plugin-alloy/core/contexts/context`),c=require(`@powerlines/plugin-alloy/typescript`),l=require(`@stryke/path`),u=require(`@stryke/string-format/snake-case`);function d(){let d=(0,s.usePowerlines)(),f=(0,i.computed)(()=>(0,r.getAppBin)(d)),p=(0,i.computed)(()=>(0,u.snakeCase)(f.value));return(0,n.createComponent)(c.TypescriptFile,{get path(){return(0,l.joinPaths)(d.entryPath,`completions`,`fish`,`shared.ts`)},builtinImports:{console:[`white`,`green`,`red`,`bold`,`cyan`,`gray`,`magenta`,`magentaBright`,`greenBright`,`redBright`,`cyanBright`,`dim`]},get children(){return[(0,n.createComponent)(o.Spacing,{}),(0,n.createComponent)(a.VarDeclaration,{const:!0,export:!0,name:`SHELL_COMPLETIONS`,get initializer(){return i.code` \`function __${p.value}_debug
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_helpers_complete_command = require('../helpers/complete-command.cjs');
3
+ const require_helpers_completion_directive_constants = require('../helpers/completion-directive-constants.cjs');
4
+ require('../helpers/index.cjs');
5
+ let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
6
+ let _shell_shock_core_plugin_utils = require("@shell-shock/core/plugin-utils");
7
+ let _alloy_js_core = require("@alloy-js/core");
8
+ let _alloy_js_typescript = require("@alloy-js/typescript");
9
+ let _powerlines_plugin_alloy_core = require("@powerlines/plugin-alloy/core");
10
+ let _powerlines_plugin_alloy_core_contexts_context = require("@powerlines/plugin-alloy/core/contexts/context");
11
+ let _powerlines_plugin_alloy_typescript = require("@powerlines/plugin-alloy/typescript");
12
+ let _stryke_path = require("@stryke/path");
13
+ let _stryke_string_format_snake_case = require("@stryke/string-format/snake-case");
14
+
15
+ //#region src/components/fish-shared.tsx
16
+ /**
17
+ * The Fish Completions generation for the Shell Shock project.
18
+ */
19
+ function FishCompletionsShared() {
20
+ const context = (0, _powerlines_plugin_alloy_core_contexts_context.usePowerlines)();
21
+ const bin = (0, _alloy_js_core.computed)(() => (0, _shell_shock_core_plugin_utils.getAppBin)(context));
22
+ const name = (0, _alloy_js_core.computed)(() => (0, _stryke_string_format_snake_case.snakeCase)(bin.value));
23
+ return (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript.TypescriptFile, {
24
+ get path() {
25
+ return (0, _stryke_path.joinPaths)(context.entryPath, "completions", "fish", "shared.ts");
26
+ },
27
+ builtinImports: { console: [
28
+ "white",
29
+ "green",
30
+ "red",
31
+ "bold",
32
+ "cyan",
33
+ "gray",
34
+ "magenta",
35
+ "magentaBright",
36
+ "greenBright",
37
+ "redBright",
38
+ "cyanBright",
39
+ "dim"
40
+ ] },
41
+ get children() {
42
+ return [
43
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core.Spacing, {}),
44
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.VarDeclaration, {
45
+ "const": true,
46
+ "export": true,
47
+ name: "SHELL_COMPLETIONS",
48
+ get initializer() {
49
+ return _alloy_js_core.code` \`function __${name.value}_debug
2
50
  set -l file "$BASH_COMP_DEBUG_FILE"
3
51
  if test -n "$file"
4
52
  echo "$argv" >> $file
5
53
  end
6
54
  end
7
55
 
8
- function __${p.value}_perform_completion
9
- __${p.value}_debug "Starting __${p.value}_perform_completion"
56
+ function __${name.value}_perform_completion
57
+ __${name.value}_debug "Starting __${name.value}_perform_completion"
10
58
 
11
59
  # Extract all args except the last one
12
60
  set -l args (commandline -opc)
13
61
  # Extract the last arg and escape it in case it is a space or wildcard
14
62
  set -l lastArg (string escape -- (commandline -ct))
15
63
 
16
- __${p.value}_debug "args: $args"
17
- __${p.value}_debug "last arg: $lastArg"
64
+ __${name.value}_debug "args: $args"
65
+ __${name.value}_debug "last arg: $lastArg"
18
66
 
19
67
  # Build the completion request command
20
- set -l requestComp "${e.EXEC_COMMAND} complete -- (string join ' ' -- (string escape -- $args[2..-1])) $lastArg"
68
+ set -l requestComp "${require_helpers_complete_command.EXEC_COMMAND} complete -- (string join ' ' -- (string escape -- $args[2..-1])) $lastArg"
21
69
 
22
- __${p.value}_debug "Calling $requestComp"
70
+ __${name.value}_debug "Calling $requestComp"
23
71
  set -l results (eval $requestComp 2> /dev/null)
24
72
 
25
73
  # Some programs may output extra empty lines after the directive.
@@ -42,9 +90,9 @@ function __${p.value}_perform_completion
42
90
  # completions must be prefixed with the flag
43
91
  set -l flagPrefix (string match -r -- '-.*=' "$lastArg")
44
92
 
45
- __${p.value}_debug "Comps: $comps"
46
- __${p.value}_debug "DirectiveLine: $directiveLine"
47
- __${p.value}_debug "flagPrefix: $flagPrefix"
93
+ __${name.value}_debug "Comps: $comps"
94
+ __${name.value}_debug "DirectiveLine: $directiveLine"
95
+ __${name.value}_debug "flagPrefix: $flagPrefix"
48
96
 
49
97
  for comp in $comps
50
98
  printf "%s%s\\n" "$flagPrefix" "$comp"
@@ -53,96 +101,96 @@ function __${p.value}_perform_completion
53
101
  printf "%s\\n" "$directiveLine"
54
102
  end
55
103
 
56
- # This function limits calls to __${p.value}_perform_completion, by caching the result
57
- function __${p.value}_perform_completion_once
58
- __${p.value}_debug "Starting __${p.value}_perform_completion_once"
104
+ # This function limits calls to __${name.value}_perform_completion, by caching the result
105
+ function __${name.value}_perform_completion_once
106
+ __${name.value}_debug "Starting __${name.value}_perform_completion_once"
59
107
 
60
- if test -n "$__${p.value}_perform_completion_once_result"
61
- __${p.value}_debug "Seems like a valid result already exists, skipping __${p.value}_perform_completion"
108
+ if test -n "$__${name.value}_perform_completion_once_result"
109
+ __${name.value}_debug "Seems like a valid result already exists, skipping __${name.value}_perform_completion"
62
110
  return 0
63
111
  end
64
112
 
65
- set --global __${p.value}_perform_completion_once_result (__${p.value}_perform_completion)
66
- if test -z "$__${p.value}_perform_completion_once_result"
67
- __${p.value}_debug "No completions, probably due to a failure"
113
+ set --global __${name.value}_perform_completion_once_result (__${name.value}_perform_completion)
114
+ if test -z "$__${name.value}_perform_completion_once_result"
115
+ __${name.value}_debug "No completions, probably due to a failure"
68
116
  return 1
69
117
  end
70
118
 
71
- __${p.value}_debug "Performed completions and set __${p.value}_perform_completion_once_result"
119
+ __${name.value}_debug "Performed completions and set __${name.value}_perform_completion_once_result"
72
120
  return 0
73
121
  end
74
122
 
75
123
  # This function is used to clear the cached result after completions are run
76
- function __${p.value}_clear_perform_completion_once_result
77
- __${p.value}_debug ""
78
- __${p.value}_debug "========= clearing previously set __${p.value}_perform_completion_once_result variable =========="
79
- set --erase __${p.value}_perform_completion_once_result
80
- __${p.value}_debug "Successfully erased the variable __${p.value}_perform_completion_once_result"
124
+ function __${name.value}_clear_perform_completion_once_result
125
+ __${name.value}_debug ""
126
+ __${name.value}_debug "========= clearing previously set __${name.value}_perform_completion_once_result variable =========="
127
+ set --erase __${name.value}_perform_completion_once_result
128
+ __${name.value}_debug "Successfully erased the variable __${name.value}_perform_completion_once_result"
81
129
  end
82
130
 
83
- function __${p.value}_requires_order_preservation
84
- __${p.value}_debug ""
85
- __${p.value}_debug "========= checking if order preservation is required =========="
131
+ function __${name.value}_requires_order_preservation
132
+ __${name.value}_debug ""
133
+ __${name.value}_debug "========= checking if order preservation is required =========="
86
134
 
87
- __${p.value}_perform_completion_once
88
- if test -z "$__${p.value}_perform_completion_once_result"
89
- __${p.value}_debug "Error determining if order preservation is required"
135
+ __${name.value}_perform_completion_once
136
+ if test -z "$__${name.value}_perform_completion_once_result"
137
+ __${name.value}_debug "Error determining if order preservation is required"
90
138
  return 1
91
139
  end
92
140
 
93
- set -l directive (string sub --start 2 $__${p.value}_perform_completion_once_result[-1])
94
- __${p.value}_debug "Directive is: $directive"
141
+ set -l directive (string sub --start 2 $__${name.value}_perform_completion_once_result[-1])
142
+ __${name.value}_debug "Directive is: $directive"
95
143
 
96
- set -l shellCompDirectiveKeepOrder ${t.CompletionDirective.CompletionDirectiveKeepOrder}
144
+ set -l shellCompDirectiveKeepOrder ${require_helpers_completion_directive_constants.CompletionDirective.CompletionDirectiveKeepOrder}
97
145
  set -l keeporder (math (math --scale 0 $directive / $shellCompDirectiveKeepOrder) % 2)
98
- __${p.value}_debug "Keeporder is: $keeporder"
146
+ __${name.value}_debug "Keeporder is: $keeporder"
99
147
 
100
148
  if test $keeporder -ne 0
101
- __${p.value}_debug "This does require order preservation"
149
+ __${name.value}_debug "This does require order preservation"
102
150
  return 0
103
151
  end
104
152
 
105
- __${p.value}_debug "This doesn't require order preservation"
153
+ __${name.value}_debug "This doesn't require order preservation"
106
154
  return 1
107
155
  end
108
156
 
109
157
  # This function does two things:
110
- # - Obtain the completions and store them in the global __${p.value}_comp_results
158
+ # - Obtain the completions and store them in the global __${name.value}_comp_results
111
159
  # - Return false if file completion should be performed
112
- function __${p.value}_prepare_completions
113
- __${p.value}_debug ""
114
- __${p.value}_debug "========= starting completion logic =========="
160
+ function __${name.value}_prepare_completions
161
+ __${name.value}_debug ""
162
+ __${name.value}_debug "========= starting completion logic =========="
115
163
 
116
164
  # Start fresh
117
- set --erase __${p.value}_comp_results
165
+ set --erase __${name.value}_comp_results
118
166
 
119
- __${p.value}_perform_completion_once
120
- __${p.value}_debug "Completion results: $__${p.value}_perform_completion_once_result"
167
+ __${name.value}_perform_completion_once
168
+ __${name.value}_debug "Completion results: $__${name.value}_perform_completion_once_result"
121
169
 
122
- if test -z "$__${p.value}_perform_completion_once_result"
123
- __${p.value}_debug "No completion, probably due to a failure"
170
+ if test -z "$__${name.value}_perform_completion_once_result"
171
+ __${name.value}_debug "No completion, probably due to a failure"
124
172
  # Might as well do file completion, in case it helps
125
173
  return 1
126
174
  end
127
175
 
128
- set -l directive (string sub --start 2 $__${p.value}_perform_completion_once_result[-1])
129
- set --global __${p.value}_comp_results $__${p.value}_perform_completion_once_result[1..-2]
176
+ set -l directive (string sub --start 2 $__${name.value}_perform_completion_once_result[-1])
177
+ set --global __${name.value}_comp_results $__${name.value}_perform_completion_once_result[1..-2]
130
178
 
131
- __${p.value}_debug "Completions are: $__${p.value}_comp_results"
132
- __${p.value}_debug "Directive is: $directive"
179
+ __${name.value}_debug "Completions are: $__${name.value}_comp_results"
180
+ __${name.value}_debug "Directive is: $directive"
133
181
 
134
- set -l shellCompDirectiveError ${t.CompletionDirective.CompletionDirectiveError}
135
- set -l shellCompDirectiveNoSpace ${t.CompletionDirective.CompletionDirectiveNoSpace}
136
- set -l shellCompDirectiveNoFileComp ${t.CompletionDirective.CompletionDirectiveNoFileComp}
137
- set -l shellCompDirectiveFilterFileExt ${t.CompletionDirective.CompletionDirectiveFilterFileExt}
138
- set -l shellCompDirectiveFilterDirs ${t.CompletionDirective.CompletionDirectiveFilterDirs}
182
+ set -l shellCompDirectiveError ${require_helpers_completion_directive_constants.CompletionDirective.CompletionDirectiveError}
183
+ set -l shellCompDirectiveNoSpace ${require_helpers_completion_directive_constants.CompletionDirective.CompletionDirectiveNoSpace}
184
+ set -l shellCompDirectiveNoFileComp ${require_helpers_completion_directive_constants.CompletionDirective.CompletionDirectiveNoFileComp}
185
+ set -l shellCompDirectiveFilterFileExt ${require_helpers_completion_directive_constants.CompletionDirective.CompletionDirectiveFilterFileExt}
186
+ set -l shellCompDirectiveFilterDirs ${require_helpers_completion_directive_constants.CompletionDirective.CompletionDirectiveFilterDirs}
139
187
  if test -z "$directive"
140
188
  set directive 0
141
189
  end
142
190
 
143
191
  set -l compErr (math (math --scale 0 $directive / $shellCompDirectiveError) % 2)
144
192
  if test $compErr -eq 1
145
- __${p.value}_debug "Received error directive: aborting."
193
+ __${name.value}_debug "Received error directive: aborting."
146
194
  # Might as well do file completion, in case it helps
147
195
  return 1
148
196
  end
@@ -150,7 +198,7 @@ function __${p.value}_prepare_completions
150
198
  set -l filefilter (math (math --scale 0 $directive / $shellCompDirectiveFilterFileExt) % 2)
151
199
  set -l dirfilter (math (math --scale 0 $directive / $shellCompDirectiveFilterDirs) % 2)
152
200
  if test $filefilter -eq 1; or test $dirfilter -eq 1
153
- __${p.value}_debug "File extension filtering or directory filtering not supported"
201
+ __${name.value}_debug "File extension filtering or directory filtering not supported"
154
202
  # Do full file completion instead
155
203
  return 1
156
204
  end
@@ -158,7 +206,7 @@ function __${p.value}_prepare_completions
158
206
  set -l nospace (math (math --scale 0 $directive / $shellCompDirectiveNoSpace) % 2)
159
207
  set -l nofiles (math (math --scale 0 $directive / $shellCompDirectiveNoFileComp) % 2)
160
208
 
161
- __${p.value}_debug "nospace: $nospace, nofiles: $nofiles"
209
+ __${name.value}_debug "nospace: $nospace, nofiles: $nofiles"
162
210
 
163
211
  # If we want to prevent a space, or if file completion is NOT disabled,
164
212
  # we need to count the number of valid completions.
@@ -167,22 +215,22 @@ function __${p.value}_prepare_completions
167
215
  # criteria than the prefix.
168
216
  if test $nospace -ne 0; or test $nofiles -eq 0
169
217
  set -l prefix (commandline -t | string escape --style=regex)
170
- __${p.value}_debug "prefix: $prefix"
218
+ __${name.value}_debug "prefix: $prefix"
171
219
 
172
- set -l completions (string match -r -- "^$prefix.*" $__${p.value}_comp_results)
173
- set --global __${p.value}_comp_results $completions
174
- __${p.value}_debug "Filtered completions are: $__${p.value}_comp_results"
220
+ set -l completions (string match -r -- "^$prefix.*" $__${name.value}_comp_results)
221
+ set --global __${name.value}_comp_results $completions
222
+ __${name.value}_debug "Filtered completions are: $__${name.value}_comp_results"
175
223
 
176
224
  # Important not to quote the variable for count to work
177
- set -l numComps (count $__${p.value}_comp_results)
178
- __${p.value}_debug "numComps: $numComps"
225
+ set -l numComps (count $__${name.value}_comp_results)
226
+ __${name.value}_debug "numComps: $numComps"
179
227
 
180
228
  if test $numComps -eq 1; and test $nospace -ne 0
181
229
  # We must first split on \\t to get rid of the descriptions to be
182
230
  # able to check what the actual completion will be.
183
231
  # We don't need descriptions anyway since there is only a single
184
232
  # real completion which the shell will expand immediately.
185
- set -l split (string split --max 1 "\\t" $__${p.value}_comp_results[1])
233
+ set -l split (string split --max 1 "\\t" $__${name.value}_comp_results[1])
186
234
 
187
235
  # Fish won't add a space if the completion ends with any
188
236
  # of the following characters: @=/:.,
@@ -190,16 +238,16 @@ function __${p.value}_prepare_completions
190
238
  if not string match -r -q "[@=/:.,]" -- "$lastChar"
191
239
  # In other cases, to support the "nospace" directive we trick the shell
192
240
  # by outputting an extra, longer completion.
193
- __${p.value}_debug "Adding second completion to perform nospace directive"
194
- set --global __${p.value}_comp_results $split[1] $split[1].
195
- __${p.value}_debug "Completions are now: $__${p.value}_comp_results"
241
+ __${name.value}_debug "Adding second completion to perform nospace directive"
242
+ set --global __${name.value}_comp_results $split[1] $split[1].
243
+ __${name.value}_debug "Completions are now: $__${name.value}_comp_results"
196
244
  end
197
245
  end
198
246
 
199
247
  if test $numComps -eq 0; and test $nofiles -eq 0
200
248
  # To be consistent with bash and zsh, we only trigger file
201
249
  # completion when there are no other completions
202
- __${p.value}_debug "Requesting file completion"
250
+ __${name.value}_debug "Requesting file completion"
203
251
  return 1
204
252
  end
205
253
  end
@@ -211,24 +259,32 @@ end
211
259
  # so we can properly delete any completions provided by another script.
212
260
  # Only do this if the program can be found, or else fish may print some errors; besides,
213
261
  # the existing completions will only be loaded if the program can be found.
214
- if type -q "${f.value}"
262
+ if type -q "${bin.value}"
215
263
  # The space after the program name is essential to trigger completion for the program
216
264
  # and not completion of the program name itself.
217
265
  # Also, we use '> /dev/null 2>&1' since '&>' is not supported in older versions of fish.
218
- complete --do-complete "${f.value} " > /dev/null 2>&1
266
+ complete --do-complete "${bin.value} " > /dev/null 2>&1
219
267
  end
220
268
 
221
269
  # Remove any pre-existing completions for the program since we will be handling all of them.
222
- complete -c ${f.value} -e
270
+ complete -c ${bin.value} -e
223
271
  # This will get called after the two calls below and clear the cached result
224
- complete -c ${f.value} -n '__${p.value}_clear_perform_completion_once_result'
225
- # The call to __${p.value}_prepare_completions will setup __${p.value}_comp_results
272
+ complete -c ${bin.value} -n '__${name.value}_clear_perform_completion_once_result'
273
+ # The call to __${name.value}_prepare_completions will setup __${name.value}_comp_results
226
274
  # which provides the program's completion choices.
227
275
  # If this doesn't require order preservation, we don't use the -k flag
228
- complete -c ${(0,r.getAppBin)(d)} -n 'not __${p.value}_requires_order_preservation && __${p.value}_prepare_completions' -f -a '$__${p.value}_comp_results'
276
+ complete -c ${(0, _shell_shock_core_plugin_utils.getAppBin)(context)} -n 'not __${name.value}_requires_order_preservation && __${name.value}_prepare_completions' -f -a '$__${name.value}_comp_results'
229
277
  # Otherwise we use the -k flag
230
- complete -k -c ${f.value} -n '__${p.value}_requires_order_preservation && __${p.value}_prepare_completions' -f -a '$__${p.value}_comp_results'
231
- \`; `}}),(0,n.createComponent)(o.Spacing,{}),(0,n.createComponent)(a.VarDeclaration,{export:!0,const:!0,name:`SHELL_COMPLETIONS_DISPLAY`,initializer:i.code` SHELL_COMPLETIONS.split("\\n").map(line => {
278
+ complete -k -c ${bin.value} -n '__${name.value}_requires_order_preservation && __${name.value}_prepare_completions' -f -a '$__${name.value}_comp_results'
279
+ \`; `;
280
+ }
281
+ }),
282
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core.Spacing, {}),
283
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.VarDeclaration, {
284
+ "export": true,
285
+ "const": true,
286
+ name: "SHELL_COMPLETIONS_DISPLAY",
287
+ initializer: _alloy_js_core.code` SHELL_COMPLETIONS.split("\\n").map(line => {
232
288
  if (!line.trim()) {
233
289
  return "";
234
290
  }
@@ -249,4 +305,12 @@ complete -k -c ${f.value} -n '__${p.value}_requires_order_preservation && __${p.
249
305
  .replaceAll(/\\s__\\w/g, bold(magentaBright("$&")))
250
306
  .replaceAll(/(?<=\\s)(-\\w|--\\w[\\w-]*)(?=\\s|$)/g, bold(magenta("$&")));
251
307
 
252
- }).join("\\n"); `})]}})}exports.FishCompletionsShared=d;
308
+ }).join("\\n"); `
309
+ })
310
+ ];
311
+ }
312
+ });
313
+ }
314
+
315
+ //#endregion
316
+ exports.FishCompletionsShared = FishCompletionsShared;