etna 0.1.27 → 0.1.32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/etna.completion +137 -55
- data/lib/etna.rb +1 -0
- data/lib/etna/application.rb +4 -0
- data/lib/etna/client.rb +30 -2
- data/lib/etna/clients/magma/formatting.rb +2 -1
- data/lib/etna/clients/magma/formatting/models_odm_xml.rb +293 -0
- data/lib/etna/clients/magma/models.rb +13 -1
- data/lib/etna/clients/magma/workflows/create_project_workflow.rb +1 -1
- data/lib/etna/clients/magma/workflows/crud_workflow.rb +19 -2
- data/lib/etna/clients/magma/workflows/materialize_magma_record_files_workflow.rb +46 -30
- data/lib/etna/clients/magma/workflows/model_synchronization_workflow.rb +1 -1
- data/lib/etna/clients/magma/workflows/update_attributes_from_csv_workflow.rb +19 -6
- data/lib/etna/clients/magma/workflows/walk_model_tree_workflow.rb +33 -6
- data/lib/etna/clients/metis/client.rb +6 -1
- data/lib/etna/clients/metis/models.rb +15 -0
- data/lib/etna/clients/metis/workflows/metis_download_workflow.rb +15 -11
- data/lib/etna/clients/metis/workflows/metis_upload_workflow.rb +83 -13
- data/lib/etna/clients/metis/workflows/sync_metis_data_workflow.rb +43 -79
- data/lib/etna/command.rb +10 -0
- data/lib/etna/cwl.rb +701 -0
- data/lib/etna/directed_graph.rb +50 -0
- data/lib/etna/filesystem.rb +145 -15
- data/lib/etna/generate_autocompletion_script.rb +11 -6
- data/lib/etna/hmac.rb +2 -2
- data/lib/etna/route.rb +44 -4
- data/lib/etna/spec/auth.rb +6 -6
- data/lib/etna/user.rb +15 -11
- metadata +33 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cb19650be05ef97433ec00556981388436eb54ee48844055218f3ec290b10f3f
|
4
|
+
data.tar.gz: fbbee21325ddd316b4a742bc0cd143cba33c4bce635ad767720ed2d330da5446
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee5548756441715e1944ced74613ae21f328910c3dcd982d638918f0df432d0ca8ee24b4ac62d7f86b17b3325483635e7e2b2ae750f93b82ef9a5629d925de01
|
7
|
+
data.tar.gz: ce866396a93210565bfc6bd9d5ff1acd69833c3bb9ff55a845e4fbdaad3769b65b0402ee3dc4c0ea937aacb7eac1432b9460ff5612c4344317bd4fcffaec4771
|
data/etna.completion
CHANGED
@@ -6,13 +6,15 @@ function _etna_completions() {
|
|
6
6
|
|
7
7
|
function _etna_inner_completions() {
|
8
8
|
local all_flag_completion_names=''
|
9
|
-
local
|
9
|
+
local arg_flag_completion_names=''
|
10
|
+
local multi_flags=''
|
10
11
|
local all_completion_names=''
|
11
12
|
local i=''
|
12
13
|
local a=''
|
13
14
|
|
14
15
|
all_flag_completion_names="$all_flag_completion_names --environment "
|
15
|
-
|
16
|
+
arg_flag_completion_names="$arg_flag_completion_names --environment "
|
17
|
+
multi_flags="$multi_flags "
|
16
18
|
declare _completions_for_environment="production staging development"
|
17
19
|
while [[ "$#" != "0" ]]; do
|
18
20
|
if [[ "$#" == "1" ]]; then
|
@@ -26,7 +28,8 @@ return
|
|
26
28
|
elif [[ "$1" == "administrate" ]]; then
|
27
29
|
shift
|
28
30
|
all_flag_completion_names="$all_flag_completion_names "
|
29
|
-
|
31
|
+
arg_flag_completion_names="$arg_flag_completion_names "
|
32
|
+
multi_flags="$multi_flags "
|
30
33
|
while [[ "$#" != "0" ]]; do
|
31
34
|
if [[ "$#" == "1" ]]; then
|
32
35
|
all_completion_names="help models project"
|
@@ -39,7 +42,8 @@ return
|
|
39
42
|
elif [[ "$1" == "help" ]]; then
|
40
43
|
shift
|
41
44
|
all_flag_completion_names="$all_flag_completion_names "
|
42
|
-
|
45
|
+
arg_flag_completion_names="$arg_flag_completion_names "
|
46
|
+
multi_flags="$multi_flags "
|
43
47
|
while [[ "$#" != "0" ]]; do
|
44
48
|
if [[ "$#" == "1" ]]; then
|
45
49
|
all_completion_names=""
|
@@ -52,10 +56,12 @@ return
|
|
52
56
|
elif [[ -z "$(echo $all_flag_completion_names | xargs)" ]]; then
|
53
57
|
return
|
54
58
|
elif [[ "$all_flag_completion_names" =~ $1\ ]]; then
|
59
|
+
if ! [[ "$multi_flags" =~ $1\ ]]; then
|
55
60
|
all_flag_completion_names="${all_flag_completion_names//$1\ /}"
|
61
|
+
fi
|
56
62
|
a=$1
|
57
63
|
shift
|
58
|
-
if [[ "$
|
64
|
+
if [[ "$arg_flag_completion_names" =~ $a\ ]]; then
|
59
65
|
if [[ "$#" == "1" ]]; then
|
60
66
|
a="${a//--/}"
|
61
67
|
a="${a//-/_}"
|
@@ -74,7 +80,8 @@ return
|
|
74
80
|
elif [[ "$1" == "models" ]]; then
|
75
81
|
shift
|
76
82
|
all_flag_completion_names="$all_flag_completion_names "
|
77
|
-
|
83
|
+
arg_flag_completion_names="$arg_flag_completion_names "
|
84
|
+
multi_flags="$multi_flags "
|
78
85
|
while [[ "$#" != "0" ]]; do
|
79
86
|
if [[ "$#" == "1" ]]; then
|
80
87
|
all_completion_names="apply_template attributes copy_template help load_from_redcap"
|
@@ -96,7 +103,8 @@ return
|
|
96
103
|
fi
|
97
104
|
shift
|
98
105
|
all_flag_completion_names="$all_flag_completion_names --file --target-model "
|
99
|
-
|
106
|
+
arg_flag_completion_names="$arg_flag_completion_names --file --target-model "
|
107
|
+
multi_flags="$multi_flags "
|
100
108
|
declare _completions_for_file="__file__"
|
101
109
|
declare _completions_for_target_model="__target_model__"
|
102
110
|
while [[ "$#" != "0" ]]; do
|
@@ -111,10 +119,12 @@ return
|
|
111
119
|
elif [[ -z "$(echo $all_flag_completion_names | xargs)" ]]; then
|
112
120
|
return
|
113
121
|
elif [[ "$all_flag_completion_names" =~ $1\ ]]; then
|
122
|
+
if ! [[ "$multi_flags" =~ $1\ ]]; then
|
114
123
|
all_flag_completion_names="${all_flag_completion_names//$1\ /}"
|
124
|
+
fi
|
115
125
|
a=$1
|
116
126
|
shift
|
117
|
-
if [[ "$
|
127
|
+
if [[ "$arg_flag_completion_names" =~ $a\ ]]; then
|
118
128
|
if [[ "$#" == "1" ]]; then
|
119
129
|
a="${a//--/}"
|
120
130
|
a="${a//-/_}"
|
@@ -133,7 +143,8 @@ return
|
|
133
143
|
elif [[ "$1" == "attributes" ]]; then
|
134
144
|
shift
|
135
145
|
all_flag_completion_names="$all_flag_completion_names "
|
136
|
-
|
146
|
+
arg_flag_completion_names="$arg_flag_completion_names "
|
147
|
+
multi_flags="$multi_flags "
|
137
148
|
while [[ "$#" != "0" ]]; do
|
138
149
|
if [[ "$#" == "1" ]]; then
|
139
150
|
all_completion_names="create_file_linking_csv help load_table_from_csv update_from_csv"
|
@@ -182,7 +193,8 @@ return
|
|
182
193
|
fi
|
183
194
|
shift
|
184
195
|
all_flag_completion_names="$all_flag_completion_names --collection --file --regex --folder "
|
185
|
-
|
196
|
+
arg_flag_completion_names="$arg_flag_completion_names --file --regex --folder "
|
197
|
+
multi_flags="$multi_flags "
|
186
198
|
declare _completions_for_file="__file__"
|
187
199
|
declare _completions_for_regex="__regex__"
|
188
200
|
declare _completions_for_folder="__folder__"
|
@@ -198,10 +210,12 @@ return
|
|
198
210
|
elif [[ -z "$(echo $all_flag_completion_names | xargs)" ]]; then
|
199
211
|
return
|
200
212
|
elif [[ "$all_flag_completion_names" =~ $1\ ]]; then
|
213
|
+
if ! [[ "$multi_flags" =~ $1\ ]]; then
|
201
214
|
all_flag_completion_names="${all_flag_completion_names//$1\ /}"
|
215
|
+
fi
|
202
216
|
a=$1
|
203
217
|
shift
|
204
|
-
if [[ "$
|
218
|
+
if [[ "$arg_flag_completion_names" =~ $a\ ]]; then
|
205
219
|
if [[ "$#" == "1" ]]; then
|
206
220
|
a="${a//--/}"
|
207
221
|
a="${a//-/_}"
|
@@ -220,7 +234,8 @@ return
|
|
220
234
|
elif [[ "$1" == "help" ]]; then
|
221
235
|
shift
|
222
236
|
all_flag_completion_names="$all_flag_completion_names "
|
223
|
-
|
237
|
+
arg_flag_completion_names="$arg_flag_completion_names "
|
238
|
+
multi_flags="$multi_flags "
|
224
239
|
while [[ "$#" != "0" ]]; do
|
225
240
|
if [[ "$#" == "1" ]]; then
|
226
241
|
all_completion_names=""
|
@@ -233,10 +248,12 @@ return
|
|
233
248
|
elif [[ -z "$(echo $all_flag_completion_names | xargs)" ]]; then
|
234
249
|
return
|
235
250
|
elif [[ "$all_flag_completion_names" =~ $1\ ]]; then
|
251
|
+
if ! [[ "$multi_flags" =~ $1\ ]]; then
|
236
252
|
all_flag_completion_names="${all_flag_completion_names//$1\ /}"
|
253
|
+
fi
|
237
254
|
a=$1
|
238
255
|
shift
|
239
|
-
if [[ "$
|
256
|
+
if [[ "$arg_flag_completion_names" =~ $a\ ]]; then
|
240
257
|
if [[ "$#" == "1" ]]; then
|
241
258
|
a="${a//--/}"
|
242
259
|
a="${a//-/_}"
|
@@ -282,7 +299,8 @@ return
|
|
282
299
|
fi
|
283
300
|
shift
|
284
301
|
all_flag_completion_names="$all_flag_completion_names --execute "
|
285
|
-
|
302
|
+
arg_flag_completion_names="$arg_flag_completion_names "
|
303
|
+
multi_flags="$multi_flags "
|
286
304
|
while [[ "$#" != "0" ]]; do
|
287
305
|
if [[ "$#" == "1" ]]; then
|
288
306
|
all_completion_names=""
|
@@ -295,10 +313,12 @@ return
|
|
295
313
|
elif [[ -z "$(echo $all_flag_completion_names | xargs)" ]]; then
|
296
314
|
return
|
297
315
|
elif [[ "$all_flag_completion_names" =~ $1\ ]]; then
|
316
|
+
if ! [[ "$multi_flags" =~ $1\ ]]; then
|
298
317
|
all_flag_completion_names="${all_flag_completion_names//$1\ /}"
|
318
|
+
fi
|
299
319
|
a=$1
|
300
320
|
shift
|
301
|
-
if [[ "$
|
321
|
+
if [[ "$arg_flag_completion_names" =~ $a\ ]]; then
|
302
322
|
if [[ "$#" == "1" ]]; then
|
303
323
|
a="${a//--/}"
|
304
324
|
a="${a//-/_}"
|
@@ -344,7 +364,8 @@ return
|
|
344
364
|
fi
|
345
365
|
shift
|
346
366
|
all_flag_completion_names="$all_flag_completion_names --json-values --hole-value "
|
347
|
-
|
367
|
+
arg_flag_completion_names="$arg_flag_completion_names --hole-value "
|
368
|
+
multi_flags="$multi_flags "
|
348
369
|
declare _completions_for_hole_value="__hole_value__"
|
349
370
|
while [[ "$#" != "0" ]]; do
|
350
371
|
if [[ "$#" == "1" ]]; then
|
@@ -358,10 +379,12 @@ return
|
|
358
379
|
elif [[ -z "$(echo $all_flag_completion_names | xargs)" ]]; then
|
359
380
|
return
|
360
381
|
elif [[ "$all_flag_completion_names" =~ $1\ ]]; then
|
382
|
+
if ! [[ "$multi_flags" =~ $1\ ]]; then
|
361
383
|
all_flag_completion_names="${all_flag_completion_names//$1\ /}"
|
384
|
+
fi
|
362
385
|
a=$1
|
363
386
|
shift
|
364
|
-
if [[ "$
|
387
|
+
if [[ "$arg_flag_completion_names" =~ $a\ ]]; then
|
365
388
|
if [[ "$#" == "1" ]]; then
|
366
389
|
a="${a//--/}"
|
367
390
|
a="${a//-/_}"
|
@@ -380,10 +403,12 @@ return
|
|
380
403
|
elif [[ -z "$(echo $all_flag_completion_names | xargs)" ]]; then
|
381
404
|
return
|
382
405
|
elif [[ "$all_flag_completion_names" =~ $1\ ]]; then
|
406
|
+
if ! [[ "$multi_flags" =~ $1\ ]]; then
|
383
407
|
all_flag_completion_names="${all_flag_completion_names//$1\ /}"
|
408
|
+
fi
|
384
409
|
a=$1
|
385
410
|
shift
|
386
|
-
if [[ "$
|
411
|
+
if [[ "$arg_flag_completion_names" =~ $a\ ]]; then
|
387
412
|
if [[ "$#" == "1" ]]; then
|
388
413
|
a="${a//--/}"
|
389
414
|
a="${a//-/_}"
|
@@ -410,7 +435,8 @@ return
|
|
410
435
|
fi
|
411
436
|
shift
|
412
437
|
all_flag_completion_names="$all_flag_completion_names --file --target-model "
|
413
|
-
|
438
|
+
arg_flag_completion_names="$arg_flag_completion_names --file --target-model "
|
439
|
+
multi_flags="$multi_flags "
|
414
440
|
declare _completions_for_file="__file__"
|
415
441
|
declare _completions_for_target_model="__target_model__"
|
416
442
|
while [[ "$#" != "0" ]]; do
|
@@ -425,10 +451,12 @@ return
|
|
425
451
|
elif [[ -z "$(echo $all_flag_completion_names | xargs)" ]]; then
|
426
452
|
return
|
427
453
|
elif [[ "$all_flag_completion_names" =~ $1\ ]]; then
|
454
|
+
if ! [[ "$multi_flags" =~ $1\ ]]; then
|
428
455
|
all_flag_completion_names="${all_flag_completion_names//$1\ /}"
|
456
|
+
fi
|
429
457
|
a=$1
|
430
458
|
shift
|
431
|
-
if [[ "$
|
459
|
+
if [[ "$arg_flag_completion_names" =~ $a\ ]]; then
|
432
460
|
if [[ "$#" == "1" ]]; then
|
433
461
|
a="${a//--/}"
|
434
462
|
a="${a//-/_}"
|
@@ -447,7 +475,8 @@ return
|
|
447
475
|
elif [[ "$1" == "help" ]]; then
|
448
476
|
shift
|
449
477
|
all_flag_completion_names="$all_flag_completion_names "
|
450
|
-
|
478
|
+
arg_flag_completion_names="$arg_flag_completion_names "
|
479
|
+
multi_flags="$multi_flags "
|
451
480
|
while [[ "$#" != "0" ]]; do
|
452
481
|
if [[ "$#" == "1" ]]; then
|
453
482
|
all_completion_names=""
|
@@ -460,10 +489,12 @@ return
|
|
460
489
|
elif [[ -z "$(echo $all_flag_completion_names | xargs)" ]]; then
|
461
490
|
return
|
462
491
|
elif [[ "$all_flag_completion_names" =~ $1\ ]]; then
|
492
|
+
if ! [[ "$multi_flags" =~ $1\ ]]; then
|
463
493
|
all_flag_completion_names="${all_flag_completion_names//$1\ /}"
|
494
|
+
fi
|
464
495
|
a=$1
|
465
496
|
shift
|
466
|
-
if [[ "$
|
497
|
+
if [[ "$arg_flag_completion_names" =~ $a\ ]]; then
|
467
498
|
if [[ "$#" == "1" ]]; then
|
468
499
|
a="${a//--/}"
|
469
500
|
a="${a//-/_}"
|
@@ -500,7 +531,8 @@ return
|
|
500
531
|
fi
|
501
532
|
shift
|
502
533
|
all_flag_completion_names="$all_flag_completion_names --commit --models --mode "
|
503
|
-
|
534
|
+
arg_flag_completion_names="$arg_flag_completion_names --models --mode "
|
535
|
+
multi_flags="$multi_flags "
|
504
536
|
declare _completions_for_models="__models__"
|
505
537
|
declare _completions_for_mode="__mode__"
|
506
538
|
while [[ "$#" != "0" ]]; do
|
@@ -515,10 +547,12 @@ return
|
|
515
547
|
elif [[ -z "$(echo $all_flag_completion_names | xargs)" ]]; then
|
516
548
|
return
|
517
549
|
elif [[ "$all_flag_completion_names" =~ $1\ ]]; then
|
550
|
+
if ! [[ "$multi_flags" =~ $1\ ]]; then
|
518
551
|
all_flag_completion_names="${all_flag_completion_names//$1\ /}"
|
552
|
+
fi
|
519
553
|
a=$1
|
520
554
|
shift
|
521
|
-
if [[ "$
|
555
|
+
if [[ "$arg_flag_completion_names" =~ $a\ ]]; then
|
522
556
|
if [[ "$#" == "1" ]]; then
|
523
557
|
a="${a//--/}"
|
524
558
|
a="${a//-/_}"
|
@@ -537,10 +571,12 @@ return
|
|
537
571
|
elif [[ -z "$(echo $all_flag_completion_names | xargs)" ]]; then
|
538
572
|
return
|
539
573
|
elif [[ "$all_flag_completion_names" =~ $1\ ]]; then
|
574
|
+
if ! [[ "$multi_flags" =~ $1\ ]]; then
|
540
575
|
all_flag_completion_names="${all_flag_completion_names//$1\ /}"
|
576
|
+
fi
|
541
577
|
a=$1
|
542
578
|
shift
|
543
|
-
if [[ "$
|
579
|
+
if [[ "$arg_flag_completion_names" =~ $a\ ]]; then
|
544
580
|
if [[ "$#" == "1" ]]; then
|
545
581
|
a="${a//--/}"
|
546
582
|
a="${a//-/_}"
|
@@ -558,7 +594,8 @@ done
|
|
558
594
|
elif [[ "$1" == "project" ]]; then
|
559
595
|
shift
|
560
596
|
all_flag_completion_names="$all_flag_completion_names "
|
561
|
-
|
597
|
+
arg_flag_completion_names="$arg_flag_completion_names "
|
598
|
+
multi_flags="$multi_flags "
|
562
599
|
while [[ "$#" != "0" ]]; do
|
563
600
|
if [[ "$#" == "1" ]]; then
|
564
601
|
all_completion_names="create help"
|
@@ -589,7 +626,8 @@ return
|
|
589
626
|
fi
|
590
627
|
shift
|
591
628
|
all_flag_completion_names="$all_flag_completion_names "
|
592
|
-
|
629
|
+
arg_flag_completion_names="$arg_flag_completion_names "
|
630
|
+
multi_flags="$multi_flags "
|
593
631
|
while [[ "$#" != "0" ]]; do
|
594
632
|
if [[ "$#" == "1" ]]; then
|
595
633
|
all_completion_names=""
|
@@ -602,10 +640,12 @@ return
|
|
602
640
|
elif [[ -z "$(echo $all_flag_completion_names | xargs)" ]]; then
|
603
641
|
return
|
604
642
|
elif [[ "$all_flag_completion_names" =~ $1\ ]]; then
|
643
|
+
if ! [[ "$multi_flags" =~ $1\ ]]; then
|
605
644
|
all_flag_completion_names="${all_flag_completion_names//$1\ /}"
|
645
|
+
fi
|
606
646
|
a=$1
|
607
647
|
shift
|
608
|
-
if [[ "$
|
648
|
+
if [[ "$arg_flag_completion_names" =~ $a\ ]]; then
|
609
649
|
if [[ "$#" == "1" ]]; then
|
610
650
|
a="${a//--/}"
|
611
651
|
a="${a//-/_}"
|
@@ -624,7 +664,8 @@ return
|
|
624
664
|
elif [[ "$1" == "help" ]]; then
|
625
665
|
shift
|
626
666
|
all_flag_completion_names="$all_flag_completion_names "
|
627
|
-
|
667
|
+
arg_flag_completion_names="$arg_flag_completion_names "
|
668
|
+
multi_flags="$multi_flags "
|
628
669
|
while [[ "$#" != "0" ]]; do
|
629
670
|
if [[ "$#" == "1" ]]; then
|
630
671
|
all_completion_names=""
|
@@ -637,10 +678,12 @@ return
|
|
637
678
|
elif [[ -z "$(echo $all_flag_completion_names | xargs)" ]]; then
|
638
679
|
return
|
639
680
|
elif [[ "$all_flag_completion_names" =~ $1\ ]]; then
|
681
|
+
if ! [[ "$multi_flags" =~ $1\ ]]; then
|
640
682
|
all_flag_completion_names="${all_flag_completion_names//$1\ /}"
|
683
|
+
fi
|
641
684
|
a=$1
|
642
685
|
shift
|
643
|
-
if [[ "$
|
686
|
+
if [[ "$arg_flag_completion_names" =~ $a\ ]]; then
|
644
687
|
if [[ "$#" == "1" ]]; then
|
645
688
|
a="${a//--/}"
|
646
689
|
a="${a//-/_}"
|
@@ -659,10 +702,12 @@ return
|
|
659
702
|
elif [[ -z "$(echo $all_flag_completion_names | xargs)" ]]; then
|
660
703
|
return
|
661
704
|
elif [[ "$all_flag_completion_names" =~ $1\ ]]; then
|
705
|
+
if ! [[ "$multi_flags" =~ $1\ ]]; then
|
662
706
|
all_flag_completion_names="${all_flag_completion_names//$1\ /}"
|
707
|
+
fi
|
663
708
|
a=$1
|
664
709
|
shift
|
665
|
-
if [[ "$
|
710
|
+
if [[ "$arg_flag_completion_names" =~ $a\ ]]; then
|
666
711
|
if [[ "$#" == "1" ]]; then
|
667
712
|
a="${a//--/}"
|
668
713
|
a="${a//-/_}"
|
@@ -680,10 +725,12 @@ done
|
|
680
725
|
elif [[ -z "$(echo $all_flag_completion_names | xargs)" ]]; then
|
681
726
|
return
|
682
727
|
elif [[ "$all_flag_completion_names" =~ $1\ ]]; then
|
728
|
+
if ! [[ "$multi_flags" =~ $1\ ]]; then
|
683
729
|
all_flag_completion_names="${all_flag_completion_names//$1\ /}"
|
730
|
+
fi
|
684
731
|
a=$1
|
685
732
|
shift
|
686
|
-
if [[ "$
|
733
|
+
if [[ "$arg_flag_completion_names" =~ $a\ ]]; then
|
687
734
|
if [[ "$#" == "1" ]]; then
|
688
735
|
a="${a//--/}"
|
689
736
|
a="${a//-/_}"
|
@@ -701,7 +748,8 @@ done
|
|
701
748
|
elif [[ "$1" == "config" ]]; then
|
702
749
|
shift
|
703
750
|
all_flag_completion_names="$all_flag_completion_names "
|
704
|
-
|
751
|
+
arg_flag_completion_names="$arg_flag_completion_names "
|
752
|
+
multi_flags="$multi_flags "
|
705
753
|
while [[ "$#" != "0" ]]; do
|
706
754
|
if [[ "$#" == "1" ]]; then
|
707
755
|
all_completion_names="help set show"
|
@@ -714,7 +762,8 @@ return
|
|
714
762
|
elif [[ "$1" == "help" ]]; then
|
715
763
|
shift
|
716
764
|
all_flag_completion_names="$all_flag_completion_names "
|
717
|
-
|
765
|
+
arg_flag_completion_names="$arg_flag_completion_names "
|
766
|
+
multi_flags="$multi_flags "
|
718
767
|
while [[ "$#" != "0" ]]; do
|
719
768
|
if [[ "$#" == "1" ]]; then
|
720
769
|
all_completion_names=""
|
@@ -727,10 +776,12 @@ return
|
|
727
776
|
elif [[ -z "$(echo $all_flag_completion_names | xargs)" ]]; then
|
728
777
|
return
|
729
778
|
elif [[ "$all_flag_completion_names" =~ $1\ ]]; then
|
779
|
+
if ! [[ "$multi_flags" =~ $1\ ]]; then
|
730
780
|
all_flag_completion_names="${all_flag_completion_names//$1\ /}"
|
781
|
+
fi
|
731
782
|
a=$1
|
732
783
|
shift
|
733
|
-
if [[ "$
|
784
|
+
if [[ "$arg_flag_completion_names" =~ $a\ ]]; then
|
734
785
|
if [[ "$#" == "1" ]]; then
|
735
786
|
a="${a//--/}"
|
736
787
|
a="${a//-/_}"
|
@@ -758,7 +809,8 @@ return
|
|
758
809
|
fi
|
759
810
|
shift
|
760
811
|
all_flag_completion_names="$all_flag_completion_names --ignore-ssl "
|
761
|
-
|
812
|
+
arg_flag_completion_names="$arg_flag_completion_names "
|
813
|
+
multi_flags="$multi_flags "
|
762
814
|
while [[ "$#" != "0" ]]; do
|
763
815
|
if [[ "$#" == "1" ]]; then
|
764
816
|
all_completion_names=""
|
@@ -771,10 +823,12 @@ return
|
|
771
823
|
elif [[ -z "$(echo $all_flag_completion_names | xargs)" ]]; then
|
772
824
|
return
|
773
825
|
elif [[ "$all_flag_completion_names" =~ $1\ ]]; then
|
826
|
+
if ! [[ "$multi_flags" =~ $1\ ]]; then
|
774
827
|
all_flag_completion_names="${all_flag_completion_names//$1\ /}"
|
828
|
+
fi
|
775
829
|
a=$1
|
776
830
|
shift
|
777
|
-
if [[ "$
|
831
|
+
if [[ "$arg_flag_completion_names" =~ $a\ ]]; then
|
778
832
|
if [[ "$#" == "1" ]]; then
|
779
833
|
a="${a//--/}"
|
780
834
|
a="${a//-/_}"
|
@@ -793,7 +847,8 @@ return
|
|
793
847
|
elif [[ "$1" == "show" ]]; then
|
794
848
|
shift
|
795
849
|
all_flag_completion_names="$all_flag_completion_names "
|
796
|
-
|
850
|
+
arg_flag_completion_names="$arg_flag_completion_names "
|
851
|
+
multi_flags="$multi_flags "
|
797
852
|
while [[ "$#" != "0" ]]; do
|
798
853
|
if [[ "$#" == "1" ]]; then
|
799
854
|
all_completion_names=""
|
@@ -806,10 +861,12 @@ return
|
|
806
861
|
elif [[ -z "$(echo $all_flag_completion_names | xargs)" ]]; then
|
807
862
|
return
|
808
863
|
elif [[ "$all_flag_completion_names" =~ $1\ ]]; then
|
864
|
+
if ! [[ "$multi_flags" =~ $1\ ]]; then
|
809
865
|
all_flag_completion_names="${all_flag_completion_names//$1\ /}"
|
866
|
+
fi
|
810
867
|
a=$1
|
811
868
|
shift
|
812
|
-
if [[ "$
|
869
|
+
if [[ "$arg_flag_completion_names" =~ $a\ ]]; then
|
813
870
|
if [[ "$#" == "1" ]]; then
|
814
871
|
a="${a//--/}"
|
815
872
|
a="${a//-/_}"
|
@@ -828,10 +885,12 @@ return
|
|
828
885
|
elif [[ -z "$(echo $all_flag_completion_names | xargs)" ]]; then
|
829
886
|
return
|
830
887
|
elif [[ "$all_flag_completion_names" =~ $1\ ]]; then
|
888
|
+
if ! [[ "$multi_flags" =~ $1\ ]]; then
|
831
889
|
all_flag_completion_names="${all_flag_completion_names//$1\ /}"
|
890
|
+
fi
|
832
891
|
a=$1
|
833
892
|
shift
|
834
|
-
if [[ "$
|
893
|
+
if [[ "$arg_flag_completion_names" =~ $a\ ]]; then
|
835
894
|
if [[ "$#" == "1" ]]; then
|
836
895
|
a="${a//--/}"
|
837
896
|
a="${a//-/_}"
|
@@ -849,7 +908,8 @@ done
|
|
849
908
|
elif [[ "$1" == "console" ]]; then
|
850
909
|
shift
|
851
910
|
all_flag_completion_names="$all_flag_completion_names "
|
852
|
-
|
911
|
+
arg_flag_completion_names="$arg_flag_completion_names "
|
912
|
+
multi_flags="$multi_flags "
|
853
913
|
while [[ "$#" != "0" ]]; do
|
854
914
|
if [[ "$#" == "1" ]]; then
|
855
915
|
all_completion_names=""
|
@@ -862,10 +922,12 @@ return
|
|
862
922
|
elif [[ -z "$(echo $all_flag_completion_names | xargs)" ]]; then
|
863
923
|
return
|
864
924
|
elif [[ "$all_flag_completion_names" =~ $1\ ]]; then
|
925
|
+
if ! [[ "$multi_flags" =~ $1\ ]]; then
|
865
926
|
all_flag_completion_names="${all_flag_completion_names//$1\ /}"
|
927
|
+
fi
|
866
928
|
a=$1
|
867
929
|
shift
|
868
|
-
if [[ "$
|
930
|
+
if [[ "$arg_flag_completion_names" =~ $a\ ]]; then
|
869
931
|
if [[ "$#" == "1" ]]; then
|
870
932
|
a="${a//--/}"
|
871
933
|
a="${a//-/_}"
|
@@ -884,7 +946,8 @@ return
|
|
884
946
|
elif [[ "$1" == "create_template" ]]; then
|
885
947
|
shift
|
886
948
|
all_flag_completion_names="$all_flag_completion_names "
|
887
|
-
|
949
|
+
arg_flag_completion_names="$arg_flag_completion_names "
|
950
|
+
multi_flags="$multi_flags "
|
888
951
|
while [[ "$#" != "0" ]]; do
|
889
952
|
if [[ "$#" == "1" ]]; then
|
890
953
|
all_completion_names="attribute_actions help"
|
@@ -897,7 +960,8 @@ return
|
|
897
960
|
elif [[ "$1" == "attribute_actions" ]]; then
|
898
961
|
shift
|
899
962
|
all_flag_completion_names="$all_flag_completion_names "
|
900
|
-
|
963
|
+
arg_flag_completion_names="$arg_flag_completion_names "
|
964
|
+
multi_flags="$multi_flags "
|
901
965
|
while [[ "$#" != "0" ]]; do
|
902
966
|
if [[ "$#" == "1" ]]; then
|
903
967
|
all_completion_names=""
|
@@ -910,10 +974,12 @@ return
|
|
910
974
|
elif [[ -z "$(echo $all_flag_completion_names | xargs)" ]]; then
|
911
975
|
return
|
912
976
|
elif [[ "$all_flag_completion_names" =~ $1\ ]]; then
|
977
|
+
if ! [[ "$multi_flags" =~ $1\ ]]; then
|
913
978
|
all_flag_completion_names="${all_flag_completion_names//$1\ /}"
|
979
|
+
fi
|
914
980
|
a=$1
|
915
981
|
shift
|
916
|
-
if [[ "$
|
982
|
+
if [[ "$arg_flag_completion_names" =~ $a\ ]]; then
|
917
983
|
if [[ "$#" == "1" ]]; then
|
918
984
|
a="${a//--/}"
|
919
985
|
a="${a//-/_}"
|
@@ -932,7 +998,8 @@ return
|
|
932
998
|
elif [[ "$1" == "help" ]]; then
|
933
999
|
shift
|
934
1000
|
all_flag_completion_names="$all_flag_completion_names "
|
935
|
-
|
1001
|
+
arg_flag_completion_names="$arg_flag_completion_names "
|
1002
|
+
multi_flags="$multi_flags "
|
936
1003
|
while [[ "$#" != "0" ]]; do
|
937
1004
|
if [[ "$#" == "1" ]]; then
|
938
1005
|
all_completion_names=""
|
@@ -945,10 +1012,12 @@ return
|
|
945
1012
|
elif [[ -z "$(echo $all_flag_completion_names | xargs)" ]]; then
|
946
1013
|
return
|
947
1014
|
elif [[ "$all_flag_completion_names" =~ $1\ ]]; then
|
1015
|
+
if ! [[ "$multi_flags" =~ $1\ ]]; then
|
948
1016
|
all_flag_completion_names="${all_flag_completion_names//$1\ /}"
|
1017
|
+
fi
|
949
1018
|
a=$1
|
950
1019
|
shift
|
951
|
-
if [[ "$
|
1020
|
+
if [[ "$arg_flag_completion_names" =~ $a\ ]]; then
|
952
1021
|
if [[ "$#" == "1" ]]; then
|
953
1022
|
a="${a//--/}"
|
954
1023
|
a="${a//-/_}"
|
@@ -967,10 +1036,12 @@ return
|
|
967
1036
|
elif [[ -z "$(echo $all_flag_completion_names | xargs)" ]]; then
|
968
1037
|
return
|
969
1038
|
elif [[ "$all_flag_completion_names" =~ $1\ ]]; then
|
1039
|
+
if ! [[ "$multi_flags" =~ $1\ ]]; then
|
970
1040
|
all_flag_completion_names="${all_flag_completion_names//$1\ /}"
|
1041
|
+
fi
|
971
1042
|
a=$1
|
972
1043
|
shift
|
973
|
-
if [[ "$
|
1044
|
+
if [[ "$arg_flag_completion_names" =~ $a\ ]]; then
|
974
1045
|
if [[ "$#" == "1" ]]; then
|
975
1046
|
a="${a//--/}"
|
976
1047
|
a="${a//-/_}"
|
@@ -988,7 +1059,8 @@ done
|
|
988
1059
|
elif [[ "$1" == "generate_completion_script" ]]; then
|
989
1060
|
shift
|
990
1061
|
all_flag_completion_names="$all_flag_completion_names "
|
991
|
-
|
1062
|
+
arg_flag_completion_names="$arg_flag_completion_names "
|
1063
|
+
multi_flags="$multi_flags "
|
992
1064
|
while [[ "$#" != "0" ]]; do
|
993
1065
|
if [[ "$#" == "1" ]]; then
|
994
1066
|
all_completion_names=""
|
@@ -1001,10 +1073,12 @@ return
|
|
1001
1073
|
elif [[ -z "$(echo $all_flag_completion_names | xargs)" ]]; then
|
1002
1074
|
return
|
1003
1075
|
elif [[ "$all_flag_completion_names" =~ $1\ ]]; then
|
1076
|
+
if ! [[ "$multi_flags" =~ $1\ ]]; then
|
1004
1077
|
all_flag_completion_names="${all_flag_completion_names//$1\ /}"
|
1078
|
+
fi
|
1005
1079
|
a=$1
|
1006
1080
|
shift
|
1007
|
-
if [[ "$
|
1081
|
+
if [[ "$arg_flag_completion_names" =~ $a\ ]]; then
|
1008
1082
|
if [[ "$#" == "1" ]]; then
|
1009
1083
|
a="${a//--/}"
|
1010
1084
|
a="${a//-/_}"
|
@@ -1023,7 +1097,8 @@ return
|
|
1023
1097
|
elif [[ "$1" == "help" ]]; then
|
1024
1098
|
shift
|
1025
1099
|
all_flag_completion_names="$all_flag_completion_names "
|
1026
|
-
|
1100
|
+
arg_flag_completion_names="$arg_flag_completion_names "
|
1101
|
+
multi_flags="$multi_flags "
|
1027
1102
|
while [[ "$#" != "0" ]]; do
|
1028
1103
|
if [[ "$#" == "1" ]]; then
|
1029
1104
|
all_completion_names=""
|
@@ -1036,10 +1111,12 @@ return
|
|
1036
1111
|
elif [[ -z "$(echo $all_flag_completion_names | xargs)" ]]; then
|
1037
1112
|
return
|
1038
1113
|
elif [[ "$all_flag_completion_names" =~ $1\ ]]; then
|
1114
|
+
if ! [[ "$multi_flags" =~ $1\ ]]; then
|
1039
1115
|
all_flag_completion_names="${all_flag_completion_names//$1\ /}"
|
1116
|
+
fi
|
1040
1117
|
a=$1
|
1041
1118
|
shift
|
1042
|
-
if [[ "$
|
1119
|
+
if [[ "$arg_flag_completion_names" =~ $a\ ]]; then
|
1043
1120
|
if [[ "$#" == "1" ]]; then
|
1044
1121
|
a="${a//--/}"
|
1045
1122
|
a="${a//-/_}"
|
@@ -1058,7 +1135,8 @@ return
|
|
1058
1135
|
elif [[ "$1" == "polyphemus" ]]; then
|
1059
1136
|
shift
|
1060
1137
|
all_flag_completion_names="$all_flag_completion_names --local --tag "
|
1061
|
-
|
1138
|
+
arg_flag_completion_names="$arg_flag_completion_names --tag "
|
1139
|
+
multi_flags="$multi_flags "
|
1062
1140
|
declare _completions_for_tag="__tag__"
|
1063
1141
|
while [[ "$#" != "0" ]]; do
|
1064
1142
|
if [[ "$#" == "1" ]]; then
|
@@ -1072,10 +1150,12 @@ return
|
|
1072
1150
|
elif [[ -z "$(echo $all_flag_completion_names | xargs)" ]]; then
|
1073
1151
|
return
|
1074
1152
|
elif [[ "$all_flag_completion_names" =~ $1\ ]]; then
|
1153
|
+
if ! [[ "$multi_flags" =~ $1\ ]]; then
|
1075
1154
|
all_flag_completion_names="${all_flag_completion_names//$1\ /}"
|
1155
|
+
fi
|
1076
1156
|
a=$1
|
1077
1157
|
shift
|
1078
|
-
if [[ "$
|
1158
|
+
if [[ "$arg_flag_completion_names" =~ $a\ ]]; then
|
1079
1159
|
if [[ "$#" == "1" ]]; then
|
1080
1160
|
a="${a//--/}"
|
1081
1161
|
a="${a//-/_}"
|
@@ -1094,10 +1174,12 @@ return
|
|
1094
1174
|
elif [[ -z "$(echo $all_flag_completion_names | xargs)" ]]; then
|
1095
1175
|
return
|
1096
1176
|
elif [[ "$all_flag_completion_names" =~ $1\ ]]; then
|
1177
|
+
if ! [[ "$multi_flags" =~ $1\ ]]; then
|
1097
1178
|
all_flag_completion_names="${all_flag_completion_names//$1\ /}"
|
1179
|
+
fi
|
1098
1180
|
a=$1
|
1099
1181
|
shift
|
1100
|
-
if [[ "$
|
1182
|
+
if [[ "$arg_flag_completion_names" =~ $a\ ]]; then
|
1101
1183
|
if [[ "$#" == "1" ]]; then
|
1102
1184
|
a="${a//--/}"
|
1103
1185
|
a="${a//-/_}"
|