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