bashly 1.4.0.rc2 → 2.0.0.rc1

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 (49) hide show
  1. checksums.yaml +4 -4
  2. data/lib/bashly/commands/completions.rb +3 -41
  3. data/lib/bashly/completions/README.md +3 -7
  4. data/lib/bashly/completions/bashly-completions.bash +178 -382
  5. data/lib/bashly/completions/completely.yaml +2 -4
  6. data/lib/bashly/config_validator.rb +55 -5
  7. data/lib/bashly/docs/arg.yml +12 -6
  8. data/lib/bashly/docs/command.yml +0 -12
  9. data/lib/bashly/docs/flag.yml +29 -5
  10. data/lib/bashly/libraries/libraries.yml +0 -15
  11. data/lib/bashly/libraries/settings/settings.yml +9 -1
  12. data/lib/bashly/script/argument.rb +12 -0
  13. data/lib/bashly/script/command.rb +1 -2
  14. data/lib/bashly/script/flag.rb +48 -11
  15. data/lib/bashly/script/introspection/commands.rb +5 -0
  16. data/lib/bashly/script/wrapper.rb +1 -1
  17. data/lib/bashly/settings.rb +28 -3
  18. data/lib/bashly/version.rb +1 -1
  19. data/lib/bashly/views/argument/completion.gtx +31 -0
  20. data/lib/bashly/views/argument/completion_filter.gtx +1 -0
  21. data/lib/bashly/views/command/completion_argument_candidates.gtx +11 -0
  22. data/lib/bashly/views/command/completion_argument_filter.gtx +25 -0
  23. data/lib/bashly/views/command/completion_command_candidates.gtx +3 -0
  24. data/lib/bashly/views/command/completion_flag_candidates.gtx +21 -0
  25. data/lib/bashly/views/command/completion_function.gtx +24 -0
  26. data/lib/bashly/views/command/completion_script.gtx +21 -0
  27. data/lib/bashly/views/command/completion_script_bash.gtx +63 -0
  28. data/lib/bashly/views/command/completion_script_zsh.gtx +52 -0
  29. data/lib/bashly/views/command/completion_word_filter.gtx +44 -0
  30. data/lib/bashly/views/command/completions.gtx +81 -0
  31. data/lib/bashly/views/command/inspect_args.gtx +3 -3
  32. data/lib/bashly/views/command/master_script.gtx +1 -0
  33. data/lib/bashly/views/command/start.gtx +9 -0
  34. data/lib/bashly/views/flag/argfile_case.gtx +8 -1
  35. data/lib/bashly/views/flag/case.gtx +9 -1
  36. data/lib/bashly/views/flag/completion.gtx +1 -0
  37. data/lib/bashly/views/flag/completion_filter.gtx +7 -0
  38. data/lib/bashly/views/flag/completion_filter_arg.gtx +10 -0
  39. data/lib/bashly/views/flag/completion_filter_block.gtx +8 -0
  40. data/lib/bashly/views/flag/completion_filter_no_arg.gtx +2 -0
  41. data/lib/bashly/views/flag/completion_value_candidates.gtx +31 -0
  42. data/lib/bashly.rb +2 -5
  43. metadata +22 -37
  44. data/lib/bashly/completion_builder.rb +0 -231
  45. data/lib/bashly/concerns/completions.rb +0 -48
  46. data/lib/bashly/libraries/completions/completions_function.rb +0 -37
  47. data/lib/bashly/libraries/completions/completions_script.rb +0 -28
  48. data/lib/bashly/libraries/completions/completions_yaml.rb +0 -26
  49. /data/lib/bashly/views/wrapper/{bash3_bouncer.gtx → bash_version_bouncer.gtx} +0 -0
@@ -4,121 +4,136 @@
4
4
  # completely (https://github.com/bashly-framework/completely)
5
5
  # Modifying it manually is not recommended
6
6
 
7
- _bashly_completions_route_flag_expects_value() {
7
+ _bashly_completions_node_flag_state() {
8
8
  case "$1:$2" in
9
- 4:--env|4:-e) return 0 ;;
10
- 4:--wrap|4:-r) return 0 ;;
11
- 5:--source|5:-s) return 0 ;;
12
- 8:--show|8:-s) return 0 ;;
9
+ 0:--help|0:-h) return 0 ;;
10
+ 0:--version|0:-v) return 0 ;;
11
+ 1:--help|1:-h) return 0 ;;
12
+ 1:--minimal|1:-m) return 0 ;;
13
+ 2:--help|2:-h) return 0 ;;
14
+ 3:--help|3:-h) return 0 ;;
15
+ 3:--verbose|3:-v) return 0 ;;
16
+ 4:--env|4:-e) return 2 ;;
17
+ 4:--wrap|4:-r) return 2 ;;
18
+ 4:--help|4:-h) return 0 ;;
19
+ 4:--force|4:-f) return 0 ;;
20
+ 4:--quiet|4:-q) return 0 ;;
21
+ 4:--upgrade|4:-u) return 0 ;;
22
+ 4:--watch|4:-w) return 0 ;;
23
+ 5:--source|5:-s) return 2 ;;
24
+ 5:--help|5:-h) return 0 ;;
25
+ 5:--force|5:-f) return 0 ;;
26
+ 5:--list|5:-l) return 0 ;;
27
+ 6:--help|6:-h) return 0 ;;
28
+ 6:--index|6:-i) return 0 ;;
29
+ 7:--help|7:-h) return 0 ;;
30
+ 7:--install|7:-i) return 0 ;;
31
+ 7:--uninstall|7:-u) return 0 ;;
32
+ 8:--show|8:-s) return 2 ;;
33
+ 8:--help|8:-h) return 0 ;;
34
+ 8:--watch|8:-w) return 0 ;;
35
+ 8:--list|8:-l) return 0 ;;
36
+ 8:--about|8:-a) return 0 ;;
37
+ 9:--help|9:-h) return 0 ;;
13
38
  esac
14
39
 
15
40
  return 1
16
41
  }
17
42
 
18
- _bashly_completions_resolve_route() {
19
- route_id=
20
- route_word_count=-1
21
- route_has_positionals=0
22
- positional_index=0
23
- if (( ${#non_options[@]} >= 0 )) &&
24
- (( 0 > route_word_count ))
25
- then
26
- route_id=0
27
- route_word_count=0
28
- route_has_positionals=0
29
- positional_index=$((${#non_options[@]} - 0))
30
- fi
31
-
32
- if (( ${#non_options[@]} >= 1 )) &&
33
- (( 1 > route_word_count )) &&
34
- [[ "${non_options[0]}" == "init" || "${non_options[0]}" == "i" ]]
35
- then
36
- route_id=1
37
- route_word_count=1
38
- route_has_positionals=0
39
- positional_index=$((${#non_options[@]} - 1))
40
- fi
41
-
42
- if (( ${#non_options[@]} >= 1 )) &&
43
- (( 1 > route_word_count )) &&
44
- [[ "${non_options[0]}" == "preview" || "${non_options[0]}" == "p" ]]
45
- then
46
- route_id=2
47
- route_word_count=1
48
- route_has_positionals=0
49
- positional_index=$((${#non_options[@]} - 1))
50
- fi
51
-
52
- if (( ${#non_options[@]} >= 1 )) &&
53
- (( 1 > route_word_count )) &&
54
- [[ "${non_options[0]}" == "validate" || "${non_options[0]}" == "v" ]]
55
- then
56
- route_id=3
57
- route_word_count=1
58
- route_has_positionals=0
59
- positional_index=$((${#non_options[@]} - 1))
60
- fi
61
-
62
- if (( ${#non_options[@]} >= 1 )) &&
63
- (( 1 > route_word_count )) &&
64
- [[ "${non_options[0]}" == "generate" || "${non_options[0]}" == "build" || "${non_options[0]}" == "g" ]]
65
- then
66
- route_id=4
67
- route_word_count=1
68
- route_has_positionals=0
69
- positional_index=$((${#non_options[@]} - 1))
70
- fi
71
-
72
- if (( ${#non_options[@]} >= 1 )) &&
73
- (( 1 > route_word_count )) &&
74
- [[ "${non_options[0]}" == "add" || "${non_options[0]}" == "a" ]]
75
- then
76
- route_id=5
77
- route_word_count=1
78
- route_has_positionals=1
79
- positional_index=$((${#non_options[@]} - 1))
80
- fi
81
-
82
- if (( ${#non_options[@]} >= 1 )) &&
83
- (( 1 > route_word_count )) &&
84
- [[ "${non_options[0]}" == "doc" ]]
85
- then
86
- route_id=6
87
- route_word_count=1
88
- route_has_positionals=1
89
- positional_index=$((${#non_options[@]} - 1))
90
- fi
43
+ _bashly_completions_option_seen() {
44
+ local completed_option option_name
45
+ for completed_option in "${completed_options[@]}"; do
46
+ for option_name in "$@"; do
47
+ [[ "$completed_option" == "$option_name" ]] && return 0
48
+ done
49
+ done
91
50
 
92
- if (( ${#non_options[@]} >= 1 )) &&
93
- (( 1 > route_word_count )) &&
94
- [[ "${non_options[0]}" == "completions" || "${non_options[0]}" == "c" ]]
95
- then
96
- route_id=7
97
- route_word_count=1
98
- route_has_positionals=0
99
- positional_index=$((${#non_options[@]} - 1))
100
- fi
51
+ return 1
52
+ }
101
53
 
102
- if (( ${#non_options[@]} >= 1 )) &&
103
- (( 1 > route_word_count )) &&
104
- [[ "${non_options[0]}" == "render" ]]
105
- then
106
- route_id=8
107
- route_word_count=1
108
- route_has_positionals=1
109
- positional_index=$((${#non_options[@]} - 1))
110
- fi
54
+ _bashly_completions_resolve_node() {
55
+ node_id=0
56
+ node_word_count=0
57
+ positional_index=0
111
58
 
112
- if (( ${#non_options[@]} >= 1 )) &&
113
- (( 1 > route_word_count )) &&
114
- [[ "${non_options[0]}" == "shell" || "${non_options[0]}" == "s" ]]
115
- then
116
- route_id=9
117
- route_word_count=1
118
- route_has_positionals=0
119
- positional_index=$((${#non_options[@]} - 1))
120
- fi
59
+ local word
60
+ for word in "${non_options[@]}"; do
61
+ case "$node_id:$word" in
62
+ 0:init)
63
+ node_id=1
64
+ node_word_count=1
65
+ ;;
66
+ 0:i)
67
+ node_id=1
68
+ node_word_count=1
69
+ ;;
70
+ 0:preview)
71
+ node_id=2
72
+ node_word_count=1
73
+ ;;
74
+ 0:p)
75
+ node_id=2
76
+ node_word_count=1
77
+ ;;
78
+ 0:validate)
79
+ node_id=3
80
+ node_word_count=1
81
+ ;;
82
+ 0:v)
83
+ node_id=3
84
+ node_word_count=1
85
+ ;;
86
+ 0:generate)
87
+ node_id=4
88
+ node_word_count=1
89
+ ;;
90
+ 0:build)
91
+ node_id=4
92
+ node_word_count=1
93
+ ;;
94
+ 0:g)
95
+ node_id=4
96
+ node_word_count=1
97
+ ;;
98
+ 0:add)
99
+ node_id=5
100
+ node_word_count=1
101
+ ;;
102
+ 0:a)
103
+ node_id=5
104
+ node_word_count=1
105
+ ;;
106
+ 0:doc)
107
+ node_id=6
108
+ node_word_count=1
109
+ ;;
110
+ 0:completions)
111
+ node_id=7
112
+ node_word_count=1
113
+ ;;
114
+ 0:c)
115
+ node_id=7
116
+ node_word_count=1
117
+ ;;
118
+ 0:render)
119
+ node_id=8
120
+ node_word_count=1
121
+ ;;
122
+ 0:shell)
123
+ node_id=9
124
+ node_word_count=1
125
+ ;;
126
+ 0:s)
127
+ node_id=9
128
+ node_word_count=1
129
+ ;;
130
+ *)
131
+ break
132
+ ;;
133
+ esac
134
+ done
121
135
 
136
+ positional_index=$((${#non_options[@]} - node_word_count))
122
137
  }
123
138
 
124
139
  _bashly_completions() {
@@ -135,11 +150,12 @@ _bashly_completions() {
135
150
 
136
151
  local non_options=()
137
152
  local completed_options=()
138
- local route_id=
139
- local route_word_count=-1
140
- local route_has_positionals=0
153
+ local node_id=
154
+ local node_word_count=-1
141
155
  local positional_index=0
142
- _bashly_completions_resolve_route
156
+ local invalid_completion=0
157
+ local flag_state=0
158
+ _bashly_completions_resolve_node
143
159
 
144
160
  local skip_next=0
145
161
  for word in "${completed[@]}"; do
@@ -149,25 +165,28 @@ _bashly_completions() {
149
165
  fi
150
166
 
151
167
  if [[ "${word:0:1}" == "-" ]]; then
168
+ _bashly_completions_node_flag_state "$node_id" "$word"
169
+ flag_state=$?
170
+ if (( flag_state == 1 )); then
171
+ invalid_completion=1
172
+ break
173
+ fi
174
+
152
175
  completed_options+=("$word")
153
- if _bashly_completions_route_flag_expects_value "$route_id" "$word"; then
176
+ if (( flag_state == 2 )); then
154
177
  skip_next=1
155
178
  fi
156
179
  continue
157
180
  fi
158
181
 
159
182
  non_options+=("$word")
160
- _bashly_completions_resolve_route
183
+ _bashly_completions_resolve_node
161
184
  done
162
185
 
163
186
  COMPREPLY=()
187
+ (( invalid_completion )) && return
164
188
 
165
- if [[ -z "$route_id" ]] || { (( route_word_count == 0 )) && (( !route_has_positionals )) && [[ "${cur:0:1}" != "-" ]]; }; then
166
- while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -W "init i preview p validate v generate build g add a doc completions c render shell s" -- "$cur")
167
- return
168
- fi
169
-
170
- case "$route_id:$prev" in
189
+ case "$node_id:$prev" in
171
190
  4:--env|4:-e)
172
191
  while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -W "development production" -- "$cur")
173
192
  return
@@ -183,329 +202,106 @@ _bashly_completions() {
183
202
  ;;
184
203
  esac
185
204
 
205
+ if [[ "${cur:0:1}" != "-" ]] && (( positional_index == 0 )); then
206
+ case "$node_id" in
207
+ 0)
208
+ while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -W "init i preview p validate v generate build g add a doc completions c render shell s" -- "$cur")
209
+ return
210
+ ;;
211
+ esac
212
+ fi
213
+
186
214
  if [[ "${cur:0:1}" == "-" ]]; then
187
- case "$route_id" in
215
+ case "$node_id" in
188
216
  0)
189
217
  local words=()
190
- local option_seen=0
191
- for completed_option in "${completed_options[@]}"; do
192
- case "$completed_option" in
193
- --help|-h) option_seen=1 ;;
194
- esac
195
- done
196
- if ((!option_seen)); then
197
- words+=("--help" "-h")
198
- fi
199
- local option_seen=0
200
- for completed_option in "${completed_options[@]}"; do
201
- case "$completed_option" in
202
- --version|-v) option_seen=1 ;;
203
- esac
204
- done
205
- if ((!option_seen)); then
206
- words+=("--version" "-v")
207
- fi
218
+ _bashly_completions_option_seen "--help" "-h" || words+=("--help" "-h")
219
+ _bashly_completions_option_seen "--version" "-v" || words+=("--version" "-v")
208
220
  while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -W "${words[*]}" -- "$cur")
209
221
  return
210
222
  ;;
211
223
  1)
212
224
  local words=()
213
- local option_seen=0
214
- for completed_option in "${completed_options[@]}"; do
215
- case "$completed_option" in
216
- --help|-h) option_seen=1 ;;
217
- esac
218
- done
219
- if ((!option_seen)); then
220
- words+=("--help" "-h")
221
- fi
222
- local option_seen=0
223
- for completed_option in "${completed_options[@]}"; do
224
- case "$completed_option" in
225
- --minimal|-m) option_seen=1 ;;
226
- esac
227
- done
228
- if ((!option_seen)); then
229
- words+=("--minimal" "-m")
230
- fi
225
+ _bashly_completions_option_seen "--help" "-h" || words+=("--help" "-h")
226
+ _bashly_completions_option_seen "--minimal" "-m" || words+=("--minimal" "-m")
231
227
  while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -W "${words[*]}" -- "$cur")
232
228
  return
233
229
  ;;
234
230
  2)
235
231
  local words=()
236
- local option_seen=0
237
- for completed_option in "${completed_options[@]}"; do
238
- case "$completed_option" in
239
- --help|-h) option_seen=1 ;;
240
- esac
241
- done
242
- if ((!option_seen)); then
243
- words+=("--help" "-h")
244
- fi
232
+ _bashly_completions_option_seen "--help" "-h" || words+=("--help" "-h")
245
233
  while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -W "${words[*]}" -- "$cur")
246
234
  return
247
235
  ;;
248
236
  3)
249
237
  local words=()
250
- local option_seen=0
251
- for completed_option in "${completed_options[@]}"; do
252
- case "$completed_option" in
253
- --help|-h) option_seen=1 ;;
254
- esac
255
- done
256
- if ((!option_seen)); then
257
- words+=("--help" "-h")
258
- fi
259
- local option_seen=0
260
- for completed_option in "${completed_options[@]}"; do
261
- case "$completed_option" in
262
- --verbose|-v) option_seen=1 ;;
263
- esac
264
- done
265
- if ((!option_seen)); then
266
- words+=("--verbose" "-v")
267
- fi
238
+ _bashly_completions_option_seen "--help" "-h" || words+=("--help" "-h")
239
+ _bashly_completions_option_seen "--verbose" "-v" || words+=("--verbose" "-v")
268
240
  while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -W "${words[*]}" -- "$cur")
269
241
  return
270
242
  ;;
271
243
  4)
272
244
  local words=()
273
- local option_seen=0
274
- for completed_option in "${completed_options[@]}"; do
275
- case "$completed_option" in
276
- --help|-h) option_seen=1 ;;
277
- esac
278
- done
279
- if ((!option_seen)); then
280
- words+=("--help" "-h")
281
- fi
282
- local option_seen=0
283
- for completed_option in "${completed_options[@]}"; do
284
- case "$completed_option" in
285
- --env|-e) option_seen=1 ;;
286
- esac
287
- done
288
- if ((!option_seen)); then
289
- words+=("--env" "-e")
290
- fi
291
- local option_seen=0
292
- for completed_option in "${completed_options[@]}"; do
293
- case "$completed_option" in
294
- --force|-f) option_seen=1 ;;
295
- esac
296
- done
297
- if ((!option_seen)); then
298
- words+=("--force" "-f")
299
- fi
300
- local option_seen=0
301
- for completed_option in "${completed_options[@]}"; do
302
- case "$completed_option" in
303
- --quiet|-q) option_seen=1 ;;
304
- esac
305
- done
306
- if ((!option_seen)); then
307
- words+=("--quiet" "-q")
308
- fi
309
- local option_seen=0
310
- for completed_option in "${completed_options[@]}"; do
311
- case "$completed_option" in
312
- --upgrade|-u) option_seen=1 ;;
313
- esac
314
- done
315
- if ((!option_seen)); then
316
- words+=("--upgrade" "-u")
317
- fi
318
- local option_seen=0
319
- for completed_option in "${completed_options[@]}"; do
320
- case "$completed_option" in
321
- --watch|-w) option_seen=1 ;;
322
- esac
323
- done
324
- if ((!option_seen)); then
325
- words+=("--watch" "-w")
326
- fi
327
- local option_seen=0
328
- for completed_option in "${completed_options[@]}"; do
329
- case "$completed_option" in
330
- --wrap|-r) option_seen=1 ;;
331
- esac
332
- done
333
- if ((!option_seen)); then
334
- words+=("--wrap" "-r")
335
- fi
245
+ _bashly_completions_option_seen "--help" "-h" || words+=("--help" "-h")
246
+ _bashly_completions_option_seen "--env" "-e" || words+=("--env" "-e")
247
+ _bashly_completions_option_seen "--force" "-f" || words+=("--force" "-f")
248
+ _bashly_completions_option_seen "--quiet" "-q" || words+=("--quiet" "-q")
249
+ _bashly_completions_option_seen "--upgrade" "-u" || words+=("--upgrade" "-u")
250
+ _bashly_completions_option_seen "--watch" "-w" || words+=("--watch" "-w")
251
+ _bashly_completions_option_seen "--wrap" "-r" || words+=("--wrap" "-r")
336
252
  while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -W "${words[*]}" -- "$cur")
337
253
  return
338
254
  ;;
339
255
  5)
340
256
  local words=()
341
- local option_seen=0
342
- for completed_option in "${completed_options[@]}"; do
343
- case "$completed_option" in
344
- --help|-h) option_seen=1 ;;
345
- esac
346
- done
347
- if ((!option_seen)); then
348
- words+=("--help" "-h")
349
- fi
350
- local option_seen=0
351
- for completed_option in "${completed_options[@]}"; do
352
- case "$completed_option" in
353
- --force|-f) option_seen=1 ;;
354
- esac
355
- done
356
- if ((!option_seen)); then
357
- words+=("--force" "-f")
358
- fi
359
- local option_seen=0
360
- for completed_option in "${completed_options[@]}"; do
361
- case "$completed_option" in
362
- --list|-l) option_seen=1 ;;
363
- esac
364
- done
365
- if ((!option_seen)); then
366
- words+=("--list" "-l")
367
- fi
368
- local option_seen=0
369
- for completed_option in "${completed_options[@]}"; do
370
- case "$completed_option" in
371
- --source|-s) option_seen=1 ;;
372
- esac
373
- done
374
- if ((!option_seen)); then
375
- words+=("--source" "-s")
376
- fi
257
+ _bashly_completions_option_seen "--help" "-h" || words+=("--help" "-h")
258
+ _bashly_completions_option_seen "--force" "-f" || words+=("--force" "-f")
259
+ _bashly_completions_option_seen "--list" "-l" || words+=("--list" "-l")
260
+ _bashly_completions_option_seen "--source" "-s" || words+=("--source" "-s")
377
261
  while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -W "${words[*]}" -- "$cur")
378
262
  return
379
263
  ;;
380
264
  6)
381
265
  local words=()
382
- local option_seen=0
383
- for completed_option in "${completed_options[@]}"; do
384
- case "$completed_option" in
385
- --help|-h) option_seen=1 ;;
386
- esac
387
- done
388
- if ((!option_seen)); then
389
- words+=("--help" "-h")
390
- fi
391
- local option_seen=0
392
- for completed_option in "${completed_options[@]}"; do
393
- case "$completed_option" in
394
- --index|-i) option_seen=1 ;;
395
- esac
396
- done
397
- if ((!option_seen)); then
398
- words+=("--index" "-i")
399
- fi
266
+ _bashly_completions_option_seen "--help" "-h" || words+=("--help" "-h")
267
+ _bashly_completions_option_seen "--index" "-i" || words+=("--index" "-i")
400
268
  while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -W "${words[*]}" -- "$cur")
401
269
  return
402
270
  ;;
403
271
  7)
404
272
  local words=()
405
- local option_seen=0
406
- for completed_option in "${completed_options[@]}"; do
407
- case "$completed_option" in
408
- --help|-h) option_seen=1 ;;
409
- esac
410
- done
411
- if ((!option_seen)); then
412
- words+=("--help" "-h")
413
- fi
414
- local option_seen=0
415
- for completed_option in "${completed_options[@]}"; do
416
- case "$completed_option" in
417
- --install|-i) option_seen=1 ;;
418
- esac
419
- done
420
- if ((!option_seen)); then
421
- words+=("--install" "-i")
422
- fi
423
- local option_seen=0
424
- for completed_option in "${completed_options[@]}"; do
425
- case "$completed_option" in
426
- --uninstall|-u) option_seen=1 ;;
427
- esac
428
- done
429
- if ((!option_seen)); then
430
- words+=("--uninstall" "-u")
431
- fi
273
+ _bashly_completions_option_seen "--help" "-h" || words+=("--help" "-h")
274
+ _bashly_completions_option_seen "--install" "-i" || words+=("--install" "-i")
275
+ _bashly_completions_option_seen "--uninstall" "-u" || words+=("--uninstall" "-u")
432
276
  while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -W "${words[*]}" -- "$cur")
433
277
  return
434
278
  ;;
435
279
  8)
436
280
  local words=()
437
- local option_seen=0
438
- for completed_option in "${completed_options[@]}"; do
439
- case "$completed_option" in
440
- --help|-h) option_seen=1 ;;
441
- esac
442
- done
443
- if ((!option_seen)); then
444
- words+=("--help" "-h")
445
- fi
446
- local option_seen=0
447
- for completed_option in "${completed_options[@]}"; do
448
- case "$completed_option" in
449
- --watch|-w) option_seen=1 ;;
450
- esac
451
- done
452
- if ((!option_seen)); then
453
- words+=("--watch" "-w")
454
- fi
455
- local option_seen=0
456
- for completed_option in "${completed_options[@]}"; do
457
- case "$completed_option" in
458
- --show|-s) option_seen=1 ;;
459
- esac
460
- done
461
- if ((!option_seen)); then
462
- words+=("--show" "-s")
463
- fi
464
- local option_seen=0
465
- for completed_option in "${completed_options[@]}"; do
466
- case "$completed_option" in
467
- --list|-l) option_seen=1 ;;
468
- esac
469
- done
470
- if ((!option_seen)); then
471
- words+=("--list" "-l")
472
- fi
473
- local option_seen=0
474
- for completed_option in "${completed_options[@]}"; do
475
- case "$completed_option" in
476
- --about|-a) option_seen=1 ;;
477
- esac
478
- done
479
- if ((!option_seen)); then
480
- words+=("--about" "-a")
481
- fi
281
+ _bashly_completions_option_seen "--help" "-h" || words+=("--help" "-h")
282
+ _bashly_completions_option_seen "--watch" "-w" || words+=("--watch" "-w")
283
+ _bashly_completions_option_seen "--show" "-s" || words+=("--show" "-s")
284
+ _bashly_completions_option_seen "--list" "-l" || words+=("--list" "-l")
285
+ _bashly_completions_option_seen "--about" "-a" || words+=("--about" "-a")
482
286
  while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -W "${words[*]}" -- "$cur")
483
287
  return
484
288
  ;;
485
289
  9)
486
290
  local words=()
487
- local option_seen=0
488
- for completed_option in "${completed_options[@]}"; do
489
- case "$completed_option" in
490
- --help|-h) option_seen=1 ;;
491
- esac
492
- done
493
- if ((!option_seen)); then
494
- words+=("--help" "-h")
495
- fi
291
+ _bashly_completions_option_seen "--help" "-h" || words+=("--help" "-h")
496
292
  while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -W "${words[*]}" -- "$cur")
497
293
  return
498
294
  ;;
499
295
  esac
500
296
  fi
501
297
 
502
- case "$route_id:$positional_index" in
298
+ case "$node_id:$positional_index" in
503
299
  5:0)
504
- while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -W "colors completions completions_script completions_yaml config help hooks ini lib render_markdown render_markdown_github render_mandoc settings stacktrace strings validations yaml" -- "$cur")
300
+ while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -W "colors config help hooks ini lib render_markdown render_markdown_github render_mandoc settings stacktrace strings validations yaml" -- "$cur")
505
301
  return
506
302
  ;;
507
303
  6:0)
508
- while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -W "arg arg.allowed arg.completions arg.default arg.help arg.name arg.repeatable arg.required arg.validate command command.alias command.args command.catch_all command.commands command.completions command.default command.dependencies command.environment_variables command.examples command.expose command.extensible command.filename command.filters command.flags command.footer command.function command.group command.help command.help_header_override command.name command.private command.variables command.version environment_variable environment_variable.default environment_variable.help environment_variable.name environment_variable.private environment_variable.required environment_variable.validate flag flag.allowed flag.arg flag.completions flag.conflicts flag.default flag.help flag.long flag.needs flag.private flag.repeatable flag.required flag.short flag.unique flag.validate variable variable.name variable.value" -- "$cur")
304
+ while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -W "arg arg.allowed arg.completions arg.default arg.help arg.name arg.repeatable arg.required arg.validate command command.alias command.args command.catch_all command.commands command.default command.dependencies command.environment_variables command.examples command.expose command.extensible command.filename command.filters command.flags command.footer command.function command.group command.help command.help_header_override command.name command.private command.variables command.version environment_variable environment_variable.default environment_variable.help environment_variable.name environment_variable.private environment_variable.required environment_variable.validate flag flag.alias flag.allowed flag.arg flag.completions flag.conflicts flag.default flag.help flag.long flag.needs flag.negatable flag.private flag.repeatable flag.required flag.short flag.unique flag.validate variable variable.name variable.value" -- "$cur")
509
305
  return
510
306
  ;;
511
307
  8:0)