completers.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
# docker-ce v18.03.0-ce https://github.com/docker/docker-ce/tree/v18.03.0-ce
$managementCommands = @(
    COMPGEN checkpoint ManagementCommand 'Manage checkpoints'
    COMPGEN config ManagementCommand 'Manage Docker configs'
    COMPGEN container ManagementCommand 'Manage containers'
    COMPGEN image ManagementCommand 'Manage images'
    COMPGEN manifest ManagementCommand 'Manage Docker image manifests and manifest lists'
    COMPGEN network ManagementCommand 'Manage networks'
    COMPGEN node ManagementCommand 'Manage Swarm nodes'
    COMPGEN plugin ManagementCommand 'Manage plugins'
    COMPGEN secret ManagementCommand 'Manage Docker secrets'
    COMPGEN service ManagementCommand 'Manage services'
    COMPGEN stack ManagementCommand 'Manage Docker stacks'
    COMPGEN swarm ManagementCommand 'Manage Swarm'
    COMPGEN system ManagementCommand 'Manage Docker'
    COMPGEN trust ManagementCommand 'Manage trust on Docker images'
    COMPGEN volume ManagementCommand 'Manage volumes'
)

$topLevelCommands = @(
    COMPGEN build TopLevelCommand 'Build an image from a Dockerfile'
    COMPGEN login TopLevelCommand 'Log in to a Docker registry'
    COMPGEN logout TopLevelCommand 'Log out from a Docker registry'
    COMPGEN run TopLevelCommand 'Run a command in a new container'
    COMPGEN search TopLevelCommand 'Search the Docker Hub for images'
    COMPGEN version TopLevelCommand 'Show the Docker version information'
)

$legacyCommands = @(
    COMPGEN attach LegacyCommand 'Attach local standard input, output, and error streams to a running container'
    COMPGEN commit LegacyCommand 'Create a new image from a container''s changes'
    COMPGEN cp LegacyCommand 'Copy files/folders between a container and the local filesystem'
    COMPGEN create LegacyCommand 'Create a new container'
    COMPGEN deploy LegacyCommand 'Deploy a new stack or update an existing stack'
    COMPGEN diff LegacyCommand 'Inspect changes to files or directories on a container''s filesystem'
    COMPGEN events LegacyCommand 'Get real time events from the server'
    COMPGEN exec LegacyCommand 'Run a command in a running container'
    COMPGEN export LegacyCommand 'Export a container''s filesystem as a tar archive'
    COMPGEN history LegacyCommand 'Show the history of an image'
    COMPGEN images LegacyCommand 'List images'
    COMPGEN import LegacyCommand 'Import the contents from a tarball to create a filesystem image'
    COMPGEN info LegacyCommand 'Display system-wide information'
    COMPGEN inspect LegacyCommand 'Return low-level information on Docker objects'
    COMPGEN kill LegacyCommand 'Kill one or more running containers'
    COMPGEN load LegacyCommand 'Load an image from a tar archive or STDIN'
    COMPGEN logs LegacyCommand 'Fetch the logs of a container'
    COMPGEN pause LegacyCommand 'Pause all processes within one or more containers'
    COMPGEN port LegacyCommand 'List port mappings or a specific mapping for the container'
    COMPGEN ps LegacyCommand 'List containers'
    COMPGEN pull LegacyCommand 'Pull an image or a repository from a registry'
    COMPGEN push LegacyCommand 'Push an image or a repository to a registry'
    COMPGEN rename LegacyCommand 'Rename a container'
    COMPGEN restart LegacyCommand 'Restart one or more containers'
    COMPGEN rm LegacyCommand 'Remove one or more containers'
    COMPGEN rmi LegacyCommand 'Remove one or more images'
    COMPGEN save LegacyCommand 'Save one or more images to a tar archive (streamed to STDOUT by default)'
    COMPGEN start LegacyCommand 'Start one or more stopped containers'
    COMPGEN stats LegacyCommand 'Display a live stream of container(s) resource usage statistics'
    COMPGEN stop LegacyCommand 'Stop one or more running containers'
    COMPGEN tag LegacyCommand 'Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE'
    COMPGEN top LegacyCommand 'Display the running processes of a container'
    COMPGEN unpause LegacyCommand 'Unpause all processes within one or more containers'
    COMPGEN update LegacyCommand 'Update configuration of one or more containers'
    COMPGEN wait LegacyCommand 'Block until one or more containers stop, then print their exit codes'
)

if ($env:DOCKER_HIDE_LEGACY_COMMANDS) {
    Register-Completer docker ($managementCommands + $topLevelCommands)
} else {
    Register-Completer docker ($managementCommands + $topLevelCommands + $legacyCommands)
}

Register-Completer docker -Option {
    COMPGEN --config string 'Location of client config files'
    COMPGEN '-D' Switch 'Enable debug mode'
    COMPGEN --debug Switch 'Enable debug mode'
    COMPGEN '-h' Switch 'Print usage'
    COMPGEN --help Switch 'Print usage'
    COMPGEN '-H' list 'Daemon socket(s) to connect to'
    COMPGEN --host list 'Daemon socket(s) to connect to'
    COMPGEN '-l' string 'Set the logging level ("debug"|"info"|"warn"|"error"|"fatal")'
    COMPGEN --log-level string 'Set the logging level ("debug"|"info"|"warn"|"error"|"fatal")'
    COMPGEN --orchestrator string 'Which orchestrator to use with the docker cli (swarm|kubernetes) (default swarm) (experimental)'
    COMPGEN --tls Switch 'Use TLS; implied by --tlsverify'
    COMPGEN --tlscacert string 'Trust certs signed only by this CA'
    COMPGEN --tlscert string 'Path to TLS certificate file'
    COMPGEN --tlskey string 'Path to TLS key file'
    COMPGEN --tlsverify Switch 'Use TLS and verify the remote'
    COMPGEN '-v' Switch 'Print version information and quit'
    COMPGEN --version Switch 'Print version information and quit'
}

Register-Completer docker_checkpoint {
    COMPGEN create SubCommand 'Create a checkpoint from a running container'
    COMPGEN ls SubCommand 'List checkpoints for a container'
    COMPGEN rm SubCommand 'Remove a checkpoint'
}

Register-Completer docker_checkpoint_create -Option {
    COMPGEN --checkpoint-dir string 'Use a custom checkpoint storage directory'
    COMPGEN --leave-running Switch 'Leave the container running after checkpoint'
}

Register-Completer docker_checkpoint_ls -Option {
    COMPGEN --checkpoint-dir string 'Use a custom checkpoint storage directory'
}

Register-Completer docker_checkpoint_rm -Option {
    COMPGEN --checkpoint-dir string 'Use a custom checkpoint storage directory'
}

Register-Completer docker_config {
    COMPGEN create SubCommand 'Create a config from a file or STDIN'
    COMPGEN inspect SubCommand 'Display detailed information on one or more configs'
    COMPGEN ls SubCommand 'List configs'
    COMPGEN rm SubCommand 'Remove one or more configs'
}

Register-Completer docker_config_create -Option {
    COMPGEN '-l' list 'Config labels'
    COMPGEN --label list 'Config labels'
    COMPGEN --template-driver string 'Template driver'
}

Register-Completer docker_config_inspect -Option {
    COMPGEN '-f' string 'Format the output using the given Go template'
    COMPGEN --format string 'Format the output using the given Go template'
    COMPGEN --pretty Switch 'Print the information in a human friendly format'
}

Register-Completer docker_config_ls -Option {
    COMPGEN '-f' filter 'Filter output based on conditions provided'
    COMPGEN --filter filter 'Filter output based on conditions provided'
    COMPGEN --format string 'Pretty-print configs using a Go template'
    COMPGEN '-q' Switch 'Only display IDs'
    COMPGEN --quiet Switch 'Only display IDs'
}

Register-Completer docker_container {
    COMPGEN attach SubCommand 'Attach local standard input, output, and error streams to a running container'
    COMPGEN commit SubCommand 'Create a new image from a container''s changes'
    COMPGEN cp SubCommand 'Copy files/folders between a container and the local filesystem'
    COMPGEN create SubCommand 'Create a new container'
    COMPGEN diff SubCommand 'Inspect changes to files or directories on a container''s filesystem'
    COMPGEN exec SubCommand 'Run a command in a running container'
    COMPGEN export SubCommand 'Export a container''s filesystem as a tar archive'
    COMPGEN inspect SubCommand 'Display detailed information on one or more containers'
    COMPGEN kill SubCommand 'Kill one or more running containers'
    COMPGEN logs SubCommand 'Fetch the logs of a container'
    COMPGEN ls SubCommand 'List containers'
    COMPGEN pause SubCommand 'Pause all processes within one or more containers'
    COMPGEN port SubCommand 'List port mappings or a specific mapping for the container'
    COMPGEN prune SubCommand 'Remove all stopped containers'
    COMPGEN rename SubCommand 'Rename a container'
    COMPGEN restart SubCommand 'Restart one or more containers'
    COMPGEN rm SubCommand 'Remove one or more containers'
    COMPGEN run SubCommand 'Run a command in a new container'
    COMPGEN start SubCommand 'Start one or more stopped containers'
    COMPGEN stats SubCommand 'Display a live stream of container(s) resource usage statistics'
    COMPGEN stop SubCommand 'Stop one or more running containers'
    COMPGEN top SubCommand 'Display the running processes of a container'
    COMPGEN unpause SubCommand 'Unpause all processes within one or more containers'
    COMPGEN update SubCommand 'Update configuration of one or more containers'
    COMPGEN wait SubCommand 'Block until one or more containers stop, then print their exit codes'
}

Register-Completer docker_container_attach -Option {
    COMPGEN --detach-keys string 'Override the key sequence for detaching a container'
    COMPGEN --no-stdin Switch 'Do not attach STDIN'
    COMPGEN --sig-proxy Switch 'Proxy all received signals to the process'
}

Register-Completer docker_container_commit -Option {
    COMPGEN '-a' string 'Author (e.g., "John Hannibal Smith <hannibal@a-team.com>")'
    COMPGEN --author string 'Author (e.g., "John Hannibal Smith <hannibal@a-team.com>")'
    COMPGEN '-c' list 'Apply Dockerfile instruction to the created image'
    COMPGEN --change list 'Apply Dockerfile instruction to the created image'
    COMPGEN '-m' string 'Commit message'
    COMPGEN --message string 'Commit message'
    COMPGEN '-p' Switch 'Pause container during commit'
    COMPGEN --pause Switch 'Pause container during commit'
}

Register-Completer docker_container_cp -Option {
    COMPGEN '-a' Switch 'Archive mode (copy all uid/gid information)'
    COMPGEN --archive Switch 'Archive mode (copy all uid/gid information)'
    COMPGEN '-L' Switch 'Always follow symbol link in SRC_PATH'
    COMPGEN --follow-link Switch 'Always follow symbol link in SRC_PATH'
}

Register-Completer docker_container_create -Option {
    COMPGEN --add-host list 'Add a custom host-to-IP mapping (host:ip)'
    COMPGEN '-a' list 'Attach to STDIN, STDOUT or STDERR'
    COMPGEN --attach list 'Attach to STDIN, STDOUT or STDERR'
    COMPGEN --blkio-weight uint16 'Block IO (relative weight), between 10 and 1000, or 0 to disable (default 0)'
    COMPGEN --blkio-weight-device list 'Block IO weight (relative device weight)'
    COMPGEN --cap-add list 'Add Linux capabilities'
    COMPGEN --cap-drop list 'Drop Linux capabilities'
    COMPGEN --cgroup-parent string 'Optional parent cgroup for the container'
    COMPGEN --cidfile string 'Write the container ID to the file'
    COMPGEN --cpu-count int 'CPU count (Windows only)'
    COMPGEN --cpu-percent int 'CPU percent (Windows only)'
    COMPGEN --cpu-period int 'Limit CPU CFS (Completely Fair Scheduler) period'
    COMPGEN --cpu-quota int 'Limit CPU CFS (Completely Fair Scheduler) quota'
    COMPGEN --cpu-rt-period int 'Limit CPU real-time period in microseconds'
    COMPGEN --cpu-rt-runtime int 'Limit CPU real-time runtime in microseconds'
    COMPGEN '-c' int 'CPU shares (relative weight)'
    COMPGEN --cpu-shares int 'CPU shares (relative weight)'
    COMPGEN --cpus decimal 'Number of CPUs'
    COMPGEN --cpuset-cpus string 'CPUs in which to allow execution (0-3, 0,1)'
    COMPGEN --cpuset-mems string 'MEMs in which to allow execution (0-3, 0,1)'
    COMPGEN --device list 'Add a host device to the container'
    COMPGEN --device-cgroup-rule list 'Add a rule to the cgroup allowed devices list'
    COMPGEN --device-read-bps list 'Limit read rate (bytes per second) from a device'
    COMPGEN --device-read-iops list 'Limit read rate (IO per second) from a device'
    COMPGEN --device-write-bps list 'Limit write rate (bytes per second) to a device'
    COMPGEN --device-write-iops list 'Limit write rate (IO per second) to a device'
    COMPGEN --disable-content-trust Switch 'Skip image verification'
    COMPGEN --dns list 'Set custom DNS servers'
    COMPGEN --dns-option list 'Set DNS options'
    COMPGEN --dns-search list 'Set custom DNS search domains'
    COMPGEN --entrypoint string 'Overwrite the default ENTRYPOINT of the image'
    COMPGEN '-e' list 'Set environment variables'
    COMPGEN --env list 'Set environment variables'
    COMPGEN --env-file list 'Read in a file of environment variables'
    COMPGEN --expose list 'Expose a port or a range of ports'
    COMPGEN --group-add list 'Add additional groups to join'
    COMPGEN --health-cmd string 'Command to run to check health'
    COMPGEN --health-interval duration 'Time between running the check (ms|s|m|h) (default 0s)'
    COMPGEN --health-retries int 'Consecutive failures needed to report unhealthy'
    COMPGEN --health-start-period duration 'Start period for the container to initialize before starting health-retries countdown (ms|s|m|h) (default 0s)'
    COMPGEN --health-timeout duration 'Maximum time to allow one check to run (ms|s|m|h) (default 0s)'
    COMPGEN '-h' string 'Container host name'
    COMPGEN --hostname string 'Container host name'
    COMPGEN --init Switch 'Run an init inside the container that forwards signals and reaps processes'
    COMPGEN '-i' Switch 'Keep STDIN open even if not attached'
    COMPGEN --interactive Switch 'Keep STDIN open even if not attached'
    COMPGEN --io-maxbandwidth bytes 'Maximum IO bandwidth limit for the system drive (Windows only)'
    COMPGEN --io-maxiops uint 'Maximum IOps limit for the system drive (Windows only)'
    COMPGEN --ip string 'IPv4 address (e.g., 172.30.100.104)'
    COMPGEN --ip6 string 'IPv6 address (e.g., 2001:db8::33)'
    COMPGEN --ipc string 'IPC mode to use'
    COMPGEN --isolation string 'Container isolation technology'
    COMPGEN --kernel-memory bytes 'Kernel memory limit'
    COMPGEN '-l' list 'Set meta data on a container'
    COMPGEN --label list 'Set meta data on a container'
    COMPGEN --label-file list 'Read in a line delimited file of labels'
    COMPGEN --link list 'Add link to another container'
    COMPGEN --link-local-ip list 'Container IPv4/IPv6 link-local addresses'
    COMPGEN --log-driver string 'Logging driver for the container'
    COMPGEN --log-opt list 'Log driver options'
    COMPGEN --mac-address string 'Container MAC address (e.g., 92:d0:c6:0a:29:33)'
    COMPGEN '-m' bytes 'Memory limit'
    COMPGEN --memory bytes 'Memory limit'
    COMPGEN --memory-reservation bytes 'Memory soft limit'
    COMPGEN --memory-swap bytes 'Swap limit equal to memory plus swap: ''-1'' to enable unlimited swap'
    COMPGEN --memory-swappiness int 'Tune container memory swappiness (0 to 100)'
    COMPGEN --mount mount 'Attach a filesystem mount to the container'
    COMPGEN --name string 'Assign a name to the container'
    COMPGEN --network string 'Connect a container to a network'
    COMPGEN --network-alias list 'Add network-scoped alias for the container'
    COMPGEN --no-healthcheck Switch 'Disable any container-specified HEALTHCHECK'
    COMPGEN --oom-kill-disable Switch 'Disable OOM Killer'
    COMPGEN --oom-score-adj int 'Tune host''s OOM preferences (-1000 to 1000)'
    COMPGEN --pid string 'PID namespace to use'
    COMPGEN --pids-limit int 'Tune container pids limit (set -1 for unlimited)'
    COMPGEN --platform string 'Set platform if server is multi-platform capable'
    COMPGEN --privileged Switch 'Give extended privileges to this container'
    COMPGEN '-p' list 'Publish a container''s port(s) to the host'
    COMPGEN --publish list 'Publish a container''s port(s) to the host'
    COMPGEN '-P' Switch 'Publish all exposed ports to random ports'
    COMPGEN --publish-all Switch 'Publish all exposed ports to random ports'
    COMPGEN --read-only Switch 'Mount the container''s root filesystem as read only'
    COMPGEN --restart string 'Restart policy to apply when a container exits'
    COMPGEN --rm Switch 'Automatically remove the container when it exits'
    COMPGEN --runtime string 'Runtime to use for this container'
    COMPGEN --security-opt list 'Security Options'
    COMPGEN --shm-size bytes 'Size of /dev/shm'
    COMPGEN --stop-signal string 'Signal to stop a container'
    COMPGEN --stop-timeout int 'Timeout (in seconds) to stop a container'
    COMPGEN --storage-opt list 'Storage driver options for the container'
    COMPGEN --sysctl map 'Sysctl options'
    COMPGEN --tmpfs list 'Mount a tmpfs directory'
    COMPGEN '-t' Switch 'Allocate a pseudo-TTY'
    COMPGEN --tty Switch 'Allocate a pseudo-TTY'
    COMPGEN --ulimit ulimit 'Ulimit options'
    COMPGEN '-u' string 'Username or UID (format: <name|uid>[:<group|gid>])'
    COMPGEN --user string 'Username or UID (format: <name|uid>[:<group|gid>])'
    COMPGEN --userns string 'User namespace to use'
    COMPGEN --uts string 'UTS namespace to use'
    COMPGEN '-v' list 'Bind mount a volume'
    COMPGEN --volume list 'Bind mount a volume'
    COMPGEN --volume-driver string 'Optional volume driver for the container'
    COMPGEN --volumes-from list 'Mount volumes from the specified container(s)'
    COMPGEN '-w' string 'Working directory inside the container'
    COMPGEN --workdir string 'Working directory inside the container'
}

Register-Completer docker_container_exec -Option {
    COMPGEN '-d' Switch 'Detached mode: run command in the background'
    COMPGEN --detach Switch 'Detached mode: run command in the background'
    COMPGEN --detach-keys string 'Override the key sequence for detaching a container'
    COMPGEN '-e' list 'Set environment variables'
    COMPGEN --env list 'Set environment variables'
    COMPGEN '-i' Switch 'Keep STDIN open even if not attached'
    COMPGEN --interactive Switch 'Keep STDIN open even if not attached'
    COMPGEN --privileged Switch 'Give extended privileges to the command'
    COMPGEN '-t' Switch 'Allocate a pseudo-TTY'
    COMPGEN --tty Switch 'Allocate a pseudo-TTY'
    COMPGEN '-u' string 'Username or UID (format: <name|uid>[:<group|gid>])'
    COMPGEN --user string 'Username or UID (format: <name|uid>[:<group|gid>])'
    COMPGEN '-w' string 'Working directory inside the container'
    COMPGEN --workdir string 'Working directory inside the container'
}

Register-Completer docker_container_export -Option {
    COMPGEN '-o' string 'Write to a file, instead of STDOUT'
    COMPGEN --output string 'Write to a file, instead of STDOUT'
}

Register-Completer docker_container_inspect -Option {
    COMPGEN '-f' string 'Format the output using the given Go template'
    COMPGEN --format string 'Format the output using the given Go template'
    COMPGEN '-s' Switch 'Display total file sizes'
    COMPGEN --size Switch 'Display total file sizes'
}

Register-Completer docker_container_kill -Option {
    COMPGEN '-s' string 'Signal to send to the container'
    COMPGEN --signal string 'Signal to send to the container'
}

Register-Completer docker_container_logs -Option {
    COMPGEN --details Switch 'Show extra details provided to logs'
    COMPGEN '-f' Switch 'Follow log output'
    COMPGEN --follow Switch 'Follow log output'
    COMPGEN --since string 'Show logs since timestamp (e.g. 2013-01-02T13:23:37) or relative (e.g. 42m for 42 minutes)'
    COMPGEN --tail string 'Number of lines to show from the end of the logs'
    COMPGEN '-t' Switch 'Show timestamps'
    COMPGEN --timestamps Switch 'Show timestamps'
    COMPGEN --until string 'Show logs before a timestamp (e.g. 2013-01-02T13:23:37) or relative (e.g. 42m for 42 minutes)'
}

Register-Completer docker_container_ls -Option {
    COMPGEN '-a' Switch 'Show all containers (default shows just running)'
    COMPGEN --all Switch 'Show all containers (default shows just running)'
    COMPGEN '-f' filter 'Filter output based on conditions provided'
    COMPGEN --filter filter 'Filter output based on conditions provided'
    COMPGEN --format string 'Pretty-print containers using a Go template'
    COMPGEN '-n' int 'Show n last created containers (includes all states)'
    COMPGEN --last int 'Show n last created containers (includes all states)'
    COMPGEN '-l' Switch 'Show the latest created container (includes all states)'
    COMPGEN --latest Switch 'Show the latest created container (includes all states)'
    COMPGEN --no-trunc Switch 'Don''t truncate output'
    COMPGEN '-q' Switch 'Only display numeric IDs'
    COMPGEN --quiet Switch 'Only display numeric IDs'
    COMPGEN '-s' Switch 'Display total file sizes'
    COMPGEN --size Switch 'Display total file sizes'
}

Register-Completer docker_container_prune -Option {
    COMPGEN --filter filter 'Provide filter values (e.g. ''until=<timestamp>'')'
    COMPGEN '-f' Switch 'Do not prompt for confirmation'
    COMPGEN --force Switch 'Do not prompt for confirmation'
}

Register-Completer docker_container_restart -Option {
    COMPGEN '-t' int 'Seconds to wait for stop before killing the container'
    COMPGEN --time int 'Seconds to wait for stop before killing the container'
}

Register-Completer docker_container_rm -Option {
    COMPGEN '-f' Switch 'Force the removal of a running container (uses SIGKILL)'
    COMPGEN --force Switch 'Force the removal of a running container (uses SIGKILL)'
    COMPGEN '-l' Switch 'Remove the specified link'
    COMPGEN --link Switch 'Remove the specified link'
    COMPGEN '-v' Switch 'Remove the volumes associated with the container'
    COMPGEN --volumes Switch 'Remove the volumes associated with the container'
}

Register-Completer docker_container_run -Option {
    COMPGEN --add-host list 'Add a custom host-to-IP mapping (host:ip)'
    COMPGEN '-a' list 'Attach to STDIN, STDOUT or STDERR'
    COMPGEN --attach list 'Attach to STDIN, STDOUT or STDERR'
    COMPGEN --blkio-weight uint16 'Block IO (relative weight), between 10 and 1000, or 0 to disable (default 0)'
    COMPGEN --blkio-weight-device list 'Block IO weight (relative device weight)'
    COMPGEN --cap-add list 'Add Linux capabilities'
    COMPGEN --cap-drop list 'Drop Linux capabilities'
    COMPGEN --cgroup-parent string 'Optional parent cgroup for the container'
    COMPGEN --cidfile string 'Write the container ID to the file'
    COMPGEN --cpu-count int 'CPU count (Windows only)'
    COMPGEN --cpu-percent int 'CPU percent (Windows only)'
    COMPGEN --cpu-period int 'Limit CPU CFS (Completely Fair Scheduler) period'
    COMPGEN --cpu-quota int 'Limit CPU CFS (Completely Fair Scheduler) quota'
    COMPGEN --cpu-rt-period int 'Limit CPU real-time period in microseconds'
    COMPGEN --cpu-rt-runtime int 'Limit CPU real-time runtime in microseconds'
    COMPGEN '-c' int 'CPU shares (relative weight)'
    COMPGEN --cpu-shares int 'CPU shares (relative weight)'
    COMPGEN --cpus decimal 'Number of CPUs'
    COMPGEN --cpuset-cpus string 'CPUs in which to allow execution (0-3, 0,1)'
    COMPGEN --cpuset-mems string 'MEMs in which to allow execution (0-3, 0,1)'
    COMPGEN '-d' Switch 'Run container in background and print container ID'
    COMPGEN --detach Switch 'Run container in background and print container ID'
    COMPGEN --detach-keys string 'Override the key sequence for detaching a container'
    COMPGEN --device list 'Add a host device to the container'
    COMPGEN --device-cgroup-rule list 'Add a rule to the cgroup allowed devices list'
    COMPGEN --device-read-bps list 'Limit read rate (bytes per second) from a device'
    COMPGEN --device-read-iops list 'Limit read rate (IO per second) from a device'
    COMPGEN --device-write-bps list 'Limit write rate (bytes per second) to a device'
    COMPGEN --device-write-iops list 'Limit write rate (IO per second) to a device'
    COMPGEN --disable-content-trust Switch 'Skip image verification'
    COMPGEN --dns list 'Set custom DNS servers'
    COMPGEN --dns-option list 'Set DNS options'
    COMPGEN --dns-search list 'Set custom DNS search domains'
    COMPGEN --entrypoint string 'Overwrite the default ENTRYPOINT of the image'
    COMPGEN '-e' list 'Set environment variables'
    COMPGEN --env list 'Set environment variables'
    COMPGEN --env-file list 'Read in a file of environment variables'
    COMPGEN --expose list 'Expose a port or a range of ports'
    COMPGEN --group-add list 'Add additional groups to join'
    COMPGEN --health-cmd string 'Command to run to check health'
    COMPGEN --health-interval duration 'Time between running the check (ms|s|m|h) (default 0s)'
    COMPGEN --health-retries int 'Consecutive failures needed to report unhealthy'
    COMPGEN --health-start-period duration 'Start period for the container to initialize before starting health-retries countdown (ms|s|m|h) (default 0s)'
    COMPGEN --health-timeout duration 'Maximum time to allow one check to run (ms|s|m|h) (default 0s)'
    COMPGEN '-h' string 'Container host name'
    COMPGEN --hostname string 'Container host name'
    COMPGEN --init Switch 'Run an init inside the container that forwards signals and reaps processes'
    COMPGEN '-i' Switch 'Keep STDIN open even if not attached'
    COMPGEN --interactive Switch 'Keep STDIN open even if not attached'
    COMPGEN --io-maxbandwidth bytes 'Maximum IO bandwidth limit for the system drive (Windows only)'
    COMPGEN --io-maxiops uint 'Maximum IOps limit for the system drive (Windows only)'
    COMPGEN --ip string 'IPv4 address (e.g., 172.30.100.104)'
    COMPGEN --ip6 string 'IPv6 address (e.g., 2001:db8::33)'
    COMPGEN --ipc string 'IPC mode to use'
    COMPGEN --isolation string 'Container isolation technology'
    COMPGEN --kernel-memory bytes 'Kernel memory limit'
    COMPGEN '-l' list 'Set meta data on a container'
    COMPGEN --label list 'Set meta data on a container'
    COMPGEN --label-file list 'Read in a line delimited file of labels'
    COMPGEN --link list 'Add link to another container'
    COMPGEN --link-local-ip list 'Container IPv4/IPv6 link-local addresses'
    COMPGEN --log-driver string 'Logging driver for the container'
    COMPGEN --log-opt list 'Log driver options'
    COMPGEN --mac-address string 'Container MAC address (e.g., 92:d0:c6:0a:29:33)'
    COMPGEN '-m' bytes 'Memory limit'
    COMPGEN --memory bytes 'Memory limit'
    COMPGEN --memory-reservation bytes 'Memory soft limit'
    COMPGEN --memory-swap bytes 'Swap limit equal to memory plus swap: ''-1'' to enable unlimited swap'
    COMPGEN --memory-swappiness int 'Tune container memory swappiness (0 to 100)'
    COMPGEN --mount mount 'Attach a filesystem mount to the container'
    COMPGEN --name string 'Assign a name to the container'
    COMPGEN --network string 'Connect a container to a network'
    COMPGEN --network-alias list 'Add network-scoped alias for the container'
    COMPGEN --no-healthcheck Switch 'Disable any container-specified HEALTHCHECK'
    COMPGEN --oom-kill-disable Switch 'Disable OOM Killer'
    COMPGEN --oom-score-adj int 'Tune host''s OOM preferences (-1000 to 1000)'
    COMPGEN --pid string 'PID namespace to use'
    COMPGEN --pids-limit int 'Tune container pids limit (set -1 for unlimited)'
    COMPGEN --platform string 'Set platform if server is multi-platform capable'
    COMPGEN --privileged Switch 'Give extended privileges to this container'
    COMPGEN '-p' list 'Publish a container''s port(s) to the host'
    COMPGEN --publish list 'Publish a container''s port(s) to the host'
    COMPGEN '-P' Switch 'Publish all exposed ports to random ports'
    COMPGEN --publish-all Switch 'Publish all exposed ports to random ports'
    COMPGEN --read-only Switch 'Mount the container''s root filesystem as read only'
    COMPGEN --restart string 'Restart policy to apply when a container exits'
    COMPGEN --rm Switch 'Automatically remove the container when it exits'
    COMPGEN --runtime string 'Runtime to use for this container'
    COMPGEN --security-opt list 'Security Options'
    COMPGEN --shm-size bytes 'Size of /dev/shm'
    COMPGEN --sig-proxy Switch 'Proxy received signals to the process'
    COMPGEN --stop-signal string 'Signal to stop a container'
    COMPGEN --stop-timeout int 'Timeout (in seconds) to stop a container'
    COMPGEN --storage-opt list 'Storage driver options for the container'
    COMPGEN --sysctl map 'Sysctl options'
    COMPGEN --tmpfs list 'Mount a tmpfs directory'
    COMPGEN '-t' Switch 'Allocate a pseudo-TTY'
    COMPGEN --tty Switch 'Allocate a pseudo-TTY'
    COMPGEN --ulimit ulimit 'Ulimit options'
    COMPGEN '-u' string 'Username or UID (format: <name|uid>[:<group|gid>])'
    COMPGEN --user string 'Username or UID (format: <name|uid>[:<group|gid>])'
    COMPGEN --userns string 'User namespace to use'
    COMPGEN --uts string 'UTS namespace to use'
    COMPGEN '-v' list 'Bind mount a volume'
    COMPGEN --volume list 'Bind mount a volume'
    COMPGEN --volume-driver string 'Optional volume driver for the container'
    COMPGEN --volumes-from list 'Mount volumes from the specified container(s)'
    COMPGEN '-w' string 'Working directory inside the container'
    COMPGEN --workdir string 'Working directory inside the container'
}

Register-Completer docker_container_start -Option {
    COMPGEN '-a' Switch 'Attach STDOUT/STDERR and forward signals'
    COMPGEN --attach Switch 'Attach STDOUT/STDERR and forward signals'
    COMPGEN --checkpoint string 'Restore from this checkpoint'
    COMPGEN --checkpoint-dir string 'Use a custom checkpoint storage directory'
    COMPGEN --detach-keys string 'Override the key sequence for detaching a container'
    COMPGEN '-i' Switch 'Attach container''s STDIN'
    COMPGEN --interactive Switch 'Attach container''s STDIN'
}

Register-Completer docker_container_stats -Option {
    COMPGEN '-a' Switch 'Show all containers (default shows just running)'
    COMPGEN --all Switch 'Show all containers (default shows just running)'
    COMPGEN --format string 'Pretty-print images using a Go template'
    COMPGEN --no-stream Switch 'Disable streaming stats and only pull the first result'
    COMPGEN --no-trunc Switch 'Do not truncate output'
}

Register-Completer docker_container_stop -Option {
    COMPGEN '-t' int 'Seconds to wait for stop before killing it'
    COMPGEN --time int 'Seconds to wait for stop before killing it'
}

Register-Completer docker_container_update -Option {
    COMPGEN --blkio-weight uint16 'Block IO (relative weight), between 10 and 1000, or 0 to disable (default 0)'
    COMPGEN --cpu-period int 'Limit CPU CFS (Completely Fair Scheduler) period'
    COMPGEN --cpu-quota int 'Limit CPU CFS (Completely Fair Scheduler) quota'
    COMPGEN --cpu-rt-period int 'Limit the CPU real-time period in microseconds'
    COMPGEN --cpu-rt-runtime int 'Limit the CPU real-time runtime in microseconds'
    COMPGEN '-c' int 'CPU shares (relative weight)'
    COMPGEN --cpu-shares int 'CPU shares (relative weight)'
    COMPGEN --cpus decimal 'Number of CPUs'
    COMPGEN --cpuset-cpus string 'CPUs in which to allow execution (0-3, 0,1)'
    COMPGEN --cpuset-mems string 'MEMs in which to allow execution (0-3, 0,1)'
    COMPGEN --kernel-memory bytes 'Kernel memory limit'
    COMPGEN '-m' bytes 'Memory limit'
    COMPGEN --memory bytes 'Memory limit'
    COMPGEN --memory-reservation bytes 'Memory soft limit'
    COMPGEN --memory-swap bytes 'Swap limit equal to memory plus swap: ''-1'' to enable unlimited swap'
    COMPGEN --restart string 'Restart policy to apply when a container exits'
}

Register-Completer docker_image {
    COMPGEN build SubCommand 'Build an image from a Dockerfile'
    COMPGEN history SubCommand 'Show the history of an image'
    COMPGEN import SubCommand 'Import the contents from a tarball to create a filesystem image'
    COMPGEN inspect SubCommand 'Display detailed information on one or more images'
    COMPGEN load SubCommand 'Load an image from a tar archive or STDIN'
    COMPGEN ls SubCommand 'List images'
    COMPGEN prune SubCommand 'Remove unused images'
    COMPGEN pull SubCommand 'Pull an image or a repository from a registry'
    COMPGEN push SubCommand 'Push an image or a repository to a registry'
    COMPGEN rm SubCommand 'Remove one or more images'
    COMPGEN save SubCommand 'Save one or more images to a tar archive (streamed to STDOUT by default)'
    COMPGEN tag SubCommand 'Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE'
}

Register-Completer docker_image_build -Option {
    COMPGEN --add-host list 'Add a custom host-to-IP mapping (host:ip)'
    COMPGEN --build-arg list 'Set build-time variables'
    COMPGEN --cache-from strings 'Images to consider as cache sources'
    COMPGEN --cgroup-parent string 'Optional parent cgroup for the container'
    COMPGEN --compress Switch 'Compress the build context using gzip'
    COMPGEN --cpu-period int 'Limit the CPU CFS (Completely Fair Scheduler) period'
    COMPGEN --cpu-quota int 'Limit the CPU CFS (Completely Fair Scheduler) quota'
    COMPGEN '-c' int 'CPU shares (relative weight)'
    COMPGEN --cpu-shares int 'CPU shares (relative weight)'
    COMPGEN --cpuset-cpus string 'CPUs in which to allow execution (0-3, 0,1)'
    COMPGEN --cpuset-mems string 'MEMs in which to allow execution (0-3, 0,1)'
    COMPGEN --disable-content-trust Switch 'Skip image verification'
    COMPGEN '-f' string 'Name of the Dockerfile (Default is ''PATH/Dockerfile'')'
    COMPGEN --file string 'Name of the Dockerfile (Default is ''PATH/Dockerfile'')'
    COMPGEN --force-rm Switch 'Always remove intermediate containers'
    COMPGEN --iidfile string 'Write the image ID to the file'
    COMPGEN --isolation string 'Container isolation technology'
    COMPGEN --label list 'Set metadata for an image'
    COMPGEN '-m' bytes 'Memory limit'
    COMPGEN --memory bytes 'Memory limit'
    COMPGEN --memory-swap bytes 'Swap limit equal to memory plus swap: ''-1'' to enable unlimited swap'
    COMPGEN --network string 'Set the networking mode for the RUN instructions during build'
    COMPGEN --no-cache Switch 'Do not use cache when building the image'
    COMPGEN --platform string 'Set platform if server is multi-platform capable'
    COMPGEN --pull Switch 'Always attempt to pull a newer version of the image'
    COMPGEN '-q' Switch 'Suppress the build output and print image ID on success'
    COMPGEN --quiet Switch 'Suppress the build output and print image ID on success'
    COMPGEN --rm Switch 'Remove intermediate containers after a successful build'
    COMPGEN --security-opt strings 'Security options'
    COMPGEN --shm-size bytes 'Size of /dev/shm'
    COMPGEN --squash Switch 'Squash newly built layers into a single new layer'
    COMPGEN --stream Switch 'Stream attaches to server to negotiate build context'
    COMPGEN '-t' list 'Name and optionally a tag in the ''name:tag'' format'
    COMPGEN --tag list 'Name and optionally a tag in the ''name:tag'' format'
    COMPGEN --target string 'Set the target build stage to build.'
    COMPGEN --ulimit ulimit 'Ulimit options'
}

Register-Completer docker_image_history -Option {
    COMPGEN --format string 'Pretty-print images using a Go template'
    COMPGEN '-H' Switch 'Print sizes and dates in human readable format'
    COMPGEN --human Switch 'Print sizes and dates in human readable format'
    COMPGEN --no-trunc Switch 'Don''t truncate output'
    COMPGEN '-q' Switch 'Only show numeric IDs'
    COMPGEN --quiet Switch 'Only show numeric IDs'
}

Register-Completer docker_image_import -Option {
    COMPGEN '-c' list 'Apply Dockerfile instruction to the created image'
    COMPGEN --change list 'Apply Dockerfile instruction to the created image'
    COMPGEN '-m' string 'Set commit message for imported image'
    COMPGEN --message string 'Set commit message for imported image'
}

Register-Completer docker_image_inspect -Option {
    COMPGEN '-f' string 'Format the output using the given Go template'
    COMPGEN --format string 'Format the output using the given Go template'
}

Register-Completer docker_image_load -Option {
    COMPGEN '-i' string 'Read from tar archive file, instead of STDIN'
    COMPGEN --input string 'Read from tar archive file, instead of STDIN'
    COMPGEN '-q' Switch 'Suppress the load output'
    COMPGEN --quiet Switch 'Suppress the load output'
}

Register-Completer docker_image_ls -Option {
    COMPGEN '-a' Switch 'Show all images (default hides intermediate images)'
    COMPGEN --all Switch 'Show all images (default hides intermediate images)'
    COMPGEN --digests Switch 'Show digests'
    COMPGEN '-f' filter 'Filter output based on conditions provided'
    COMPGEN --filter filter 'Filter output based on conditions provided'
    COMPGEN --format string 'Pretty-print images using a Go template'
    COMPGEN --no-trunc Switch 'Don''t truncate output'
    COMPGEN '-q' Switch 'Only show numeric IDs'
    COMPGEN --quiet Switch 'Only show numeric IDs'
}

Register-Completer docker_image_prune -Option {
    COMPGEN '-a' Switch 'Remove all unused images, not just dangling ones'
    COMPGEN --all Switch 'Remove all unused images, not just dangling ones'
    COMPGEN --filter filter 'Provide filter values (e.g. ''until=<timestamp>'')'
    COMPGEN '-f' Switch 'Do not prompt for confirmation'
    COMPGEN --force Switch 'Do not prompt for confirmation'
}

Register-Completer docker_image_pull -Option {
    COMPGEN '-a' Switch 'Download all tagged images in the repository'
    COMPGEN --all-tags Switch 'Download all tagged images in the repository'
    COMPGEN --disable-content-trust Switch 'Skip image verification'
    COMPGEN --platform string 'Set platform if server is multi-platform capable'
}

Register-Completer docker_image_push -Option {
    COMPGEN --disable-content-trust Switch 'Skip image signing'
}

Register-Completer docker_image_rm -Option {
    COMPGEN '-f' Switch 'Force removal of the image'
    COMPGEN --force Switch 'Force removal of the image'
    COMPGEN --no-prune Switch 'Do not delete untagged parents'
}

Register-Completer docker_image_save -Option {
    COMPGEN '-o' string 'Write to a file, instead of STDOUT'
    COMPGEN --output string 'Write to a file, instead of STDOUT'
}

Register-Completer docker_manifest {
    COMPGEN annotate SubCommand 'Add additional information to a local image manifest'
    COMPGEN create SubCommand 'Create a local manifest list for annotating and pushing to a registry'
    COMPGEN inspect SubCommand 'Display an image manifest, or manifest list'
    COMPGEN push SubCommand 'Push a manifest list to a repository'
}

Register-Completer docker_manifest_annotate -Option {
    COMPGEN --arch string 'Set architecture'
    COMPGEN --os string 'Set operating system'
    COMPGEN --os-features strings 'Set operating system feature'
    COMPGEN --variant string 'Set architecture variant'
}

Register-Completer docker_manifest_create -Option {
    COMPGEN '-a' Switch 'Amend an existing manifest list'
    COMPGEN --amend Switch 'Amend an existing manifest list'
    COMPGEN --insecure Switch 'allow communication with an insecure registry'
}

Register-Completer docker_manifest_inspect -Option {
    COMPGEN --insecure Switch 'allow communication with an insecure registry'
    COMPGEN '-v' Switch 'Output additional info including layers and platform'
    COMPGEN --verbose Switch 'Output additional info including layers and platform'
}

Register-Completer docker_manifest_push -Option {
    COMPGEN --insecure Switch 'Allow push to an insecure registry'
    COMPGEN '-p' Switch 'Remove the local manifest list after push'
    COMPGEN --purge Switch 'Remove the local manifest list after push'
}

Register-Completer docker_network {
    COMPGEN connect SubCommand 'Connect a container to a network'
    COMPGEN create SubCommand 'Create a network'
    COMPGEN disconnect SubCommand 'Disconnect a container from a network'
    COMPGEN inspect SubCommand 'Display detailed information on one or more networks'
    COMPGEN ls SubCommand 'List networks'
    COMPGEN prune SubCommand 'Remove all unused networks'
    COMPGEN rm SubCommand 'Remove one or more networks'
}

Register-Completer docker_network_connect -Option {
    COMPGEN --alias strings 'Add network-scoped alias for the container'
    COMPGEN --ip string 'IPv4 address (e.g., 172.30.100.104)'
    COMPGEN --ip6 string 'IPv6 address (e.g., 2001:db8::33)'
    COMPGEN --link list 'Add link to another container'
    COMPGEN --link-local-ip strings 'Add a link-local address for the container'
}

Register-Completer docker_network_create -Option {
    COMPGEN --attachable Switch 'Enable manual container attachment'
    COMPGEN --aux-address map 'Auxiliary IPv4 or IPv6 addresses used by Network driver'
    COMPGEN --config-from string 'The network from which copying the configuration'
    COMPGEN --config-only Switch 'Create a configuration only network'
    COMPGEN '-d' string 'Driver to manage the Network'
    COMPGEN --driver string 'Driver to manage the Network'
    COMPGEN --gateway strings 'IPv4 or IPv6 Gateway for the master subnet'
    COMPGEN --ingress Switch 'Create swarm routing-mesh network'
    COMPGEN --internal Switch 'Restrict external access to the network'
    COMPGEN --ip-range strings 'Allocate container ip from a sub-range'
    COMPGEN --ipam-driver string 'IP Address Management Driver'
    COMPGEN --ipam-opt map 'Set IPAM driver specific options'
    COMPGEN --ipv6 Switch 'Enable IPv6 networking'
    COMPGEN --label list 'Set metadata on a network'
    COMPGEN '-o' map 'Set driver specific options'
    COMPGEN --opt map 'Set driver specific options'
    COMPGEN --scope string 'Control the network''s scope'
    COMPGEN --subnet strings 'Subnet in CIDR format that represents a network segment'
}

Register-Completer docker_network_disconnect -Option {
    COMPGEN '-f' Switch 'Force the container to disconnect from a network'
    COMPGEN --force Switch 'Force the container to disconnect from a network'
}

Register-Completer docker_network_inspect -Option {
    COMPGEN '-f' string 'Format the output using the given Go template'
    COMPGEN --format string 'Format the output using the given Go template'
    COMPGEN '-v' Switch 'Verbose output for diagnostics'
    COMPGEN --verbose Switch 'Verbose output for diagnostics'
}

Register-Completer docker_network_ls -Option {
    COMPGEN '-f' filter 'Provide filter values (e.g. ''driver=bridge'')'
    COMPGEN --filter filter 'Provide filter values (e.g. ''driver=bridge'')'
    COMPGEN --format string 'Pretty-print networks using a Go template'
    COMPGEN --no-trunc Switch 'Do not truncate the output'
    COMPGEN '-q' Switch 'Only display network IDs'
    COMPGEN --quiet Switch 'Only display network IDs'
}

Register-Completer docker_network_prune -Option {
    COMPGEN --filter filter 'Provide filter values (e.g. ''until=<timestamp>'')'
    COMPGEN '-f' Switch 'Do not prompt for confirmation'
    COMPGEN --force Switch 'Do not prompt for confirmation'
}

Register-Completer docker_node {
    COMPGEN demote SubCommand 'Demote one or more nodes from manager in the swarm'
    COMPGEN inspect SubCommand 'Display detailed information on one or more nodes'
    COMPGEN ls SubCommand 'List nodes in the swarm'
    COMPGEN promote SubCommand 'Promote one or more nodes to manager in the swarm'
    COMPGEN ps SubCommand 'List tasks running on one or more nodes, defaults to current node'
    COMPGEN rm SubCommand 'Remove one or more nodes from the swarm'
    COMPGEN update SubCommand 'Update a node'
}

Register-Completer docker_node_inspect -Option {
    COMPGEN '-f' string 'Format the output using the given Go template'
    COMPGEN --format string 'Format the output using the given Go template'
    COMPGEN --pretty Switch 'Print the information in a human friendly format'
}

Register-Completer docker_node_ls -Option {
    COMPGEN '-f' filter 'Filter output based on conditions provided'
    COMPGEN --filter filter 'Filter output based on conditions provided'
    COMPGEN --format string 'Pretty-print nodes using a Go template'
    COMPGEN '-q' Switch 'Only display IDs'
    COMPGEN --quiet Switch 'Only display IDs'
}

Register-Completer docker_node_ps -Option {
    COMPGEN '-f' filter 'Filter output based on conditions provided'
    COMPGEN --filter filter 'Filter output based on conditions provided'
    COMPGEN --format string 'Pretty-print tasks using a Go template'
    COMPGEN --no-resolve Switch 'Do not map IDs to Names'
    COMPGEN --no-trunc Switch 'Do not truncate output'
    COMPGEN '-q' Switch 'Only display task IDs'
    COMPGEN --quiet Switch 'Only display task IDs'
}

Register-Completer docker_node_rm -Option {
    COMPGEN '-f' Switch 'Force remove a node from the swarm'
    COMPGEN --force Switch 'Force remove a node from the swarm'
}

Register-Completer docker_node_update -Option {
    COMPGEN --availability string 'Availability of the node ("active"|"pause"|"drain")'
    COMPGEN --label-add list 'Add or update a node label (key=value)'
    COMPGEN --label-rm list 'Remove a node label if exists'
    COMPGEN --role string 'Role of the node ("worker"|"manager")'
}

Register-Completer docker_plugin {
    COMPGEN create SubCommand 'Create a plugin from a rootfs and configuration. Plugin data directory must contain config.json and rootfs directory.'
    COMPGEN disable SubCommand 'Disable a plugin'
    COMPGEN enable SubCommand 'Enable a plugin'
    COMPGEN inspect SubCommand 'Display detailed information on one or more plugins'
    COMPGEN install SubCommand 'Install a plugin'
    COMPGEN ls SubCommand 'List plugins'
    COMPGEN push SubCommand 'Push a plugin to a registry'
    COMPGEN rm SubCommand 'Remove one or more plugins'
    COMPGEN set SubCommand 'Change settings for a plugin'
    COMPGEN upgrade SubCommand 'Upgrade an existing plugin'
}

Register-Completer docker_plugin_create -Option {
    COMPGEN --compress Switch 'Compress the context using gzip'
}

Register-Completer docker_plugin_disable -Option {
    COMPGEN '-f' Switch 'Force the disable of an active plugin'
    COMPGEN --force Switch 'Force the disable of an active plugin'
}

Register-Completer docker_plugin_enable -Option {
    COMPGEN --timeout int 'HTTP client timeout (in seconds)'
}

Register-Completer docker_plugin_inspect -Option {
    COMPGEN '-f' string 'Format the output using the given Go template'
    COMPGEN --format string 'Format the output using the given Go template'
}

Register-Completer docker_plugin_install -Option {
    COMPGEN --alias string 'Local name for plugin'
    COMPGEN --disable Switch 'Do not enable the plugin on install'
    COMPGEN --disable-content-trust Switch 'Skip image verification'
    COMPGEN --grant-all-permissions Switch 'Grant all permissions necessary to run the plugin'
}

Register-Completer docker_plugin_ls -Option {
    COMPGEN '-f' filter 'Provide filter values (e.g. ''enabled=true'')'
    COMPGEN --filter filter 'Provide filter values (e.g. ''enabled=true'')'
    COMPGEN --format string 'Pretty-print plugins using a Go template'
    COMPGEN --no-trunc Switch 'Don''t truncate output'
    COMPGEN '-q' Switch 'Only display plugin IDs'
    COMPGEN --quiet Switch 'Only display plugin IDs'
}

Register-Completer docker_plugin_push -Option {
    COMPGEN --disable-content-trust Switch 'Skip image signing'
}

Register-Completer docker_plugin_rm -Option {
    COMPGEN '-f' Switch 'Force the removal of an active plugin'
    COMPGEN --force Switch 'Force the removal of an active plugin'
}

Register-Completer docker_plugin_upgrade -Option {
    COMPGEN --disable-content-trust Switch 'Skip image verification'
    COMPGEN --grant-all-permissions Switch 'Grant all permissions necessary to run the plugin'
    COMPGEN --skip-remote-check Switch 'Do not check if specified remote plugin matches existing plugin image'
}

Register-Completer docker_secret {
    COMPGEN create SubCommand 'Create a secret from a file or STDIN as content'
    COMPGEN inspect SubCommand 'Display detailed information on one or more secrets'
    COMPGEN ls SubCommand 'List secrets'
    COMPGEN rm SubCommand 'Remove one or more secrets'
}

Register-Completer docker_secret_create -Option {
    COMPGEN '-d' string 'Secret driver'
    COMPGEN --driver string 'Secret driver'
    COMPGEN '-l' list 'Secret labels'
    COMPGEN --label list 'Secret labels'
    COMPGEN --template-driver string 'Template driver'
}

Register-Completer docker_secret_inspect -Option {
    COMPGEN '-f' string 'Format the output using the given Go template'
    COMPGEN --format string 'Format the output using the given Go template'
    COMPGEN --pretty Switch 'Print the information in a human friendly format'
}

Register-Completer docker_secret_ls -Option {
    COMPGEN '-f' filter 'Filter output based on conditions provided'
    COMPGEN --filter filter 'Filter output based on conditions provided'
    COMPGEN --format string 'Pretty-print secrets using a Go template'
    COMPGEN '-q' Switch 'Only display IDs'
    COMPGEN --quiet Switch 'Only display IDs'
}

Register-Completer docker_service {
    COMPGEN create SubCommand 'Create a new service'
    COMPGEN inspect SubCommand 'Display detailed information on one or more services'
    COMPGEN logs SubCommand 'Fetch the logs of a service or task'
    COMPGEN ls SubCommand 'List services'
    COMPGEN ps SubCommand 'List the tasks of one or more services'
    COMPGEN rm SubCommand 'Remove one or more services'
    COMPGEN rollback SubCommand 'Revert changes to a service''s configuration'
    COMPGEN scale SubCommand 'Scale one or multiple replicated services'
    COMPGEN update SubCommand 'Update a service'
}

Register-Completer docker_service_create -Option {
    COMPGEN --config config 'Specify configurations to expose to the service'
    COMPGEN --constraint list 'Placement constraints'
    COMPGEN --container-label list 'Container labels'
    COMPGEN --credential-spec credential-spec 'Credential spec for managed service account (Windows only)'
    COMPGEN '-d' Switch 'Exit immediately instead of waiting for the service to converge'
    COMPGEN --detach Switch 'Exit immediately instead of waiting for the service to converge'
    COMPGEN --dns list 'Set custom DNS servers'
    COMPGEN --dns-option list 'Set DNS options'
    COMPGEN --dns-search list 'Set custom DNS search domains'
    COMPGEN --endpoint-mode string 'Endpoint mode (vip or dnsrr)'
    COMPGEN --entrypoint command 'Overwrite the default ENTRYPOINT of the image'
    COMPGEN '-e' list 'Set environment variables'
    COMPGEN --env list 'Set environment variables'
    COMPGEN --env-file list 'Read in a file of environment variables'
    COMPGEN --generic-resource list 'User defined resources'
    COMPGEN --group list 'Set one or more supplementary user groups for the container'
    COMPGEN --health-cmd string 'Command to run to check health'
    COMPGEN --health-interval duration 'Time between running the check (ms|s|m|h)'
    COMPGEN --health-retries int 'Consecutive failures needed to report unhealthy'
    COMPGEN --health-start-period duration 'Start period for the container to initialize before counting retries towards unstable (ms|s|m|h)'
    COMPGEN --health-timeout duration 'Maximum time to allow one check to run (ms|s|m|h)'
    COMPGEN --host list 'Set one or more custom host-to-IP mappings (host:ip)'
    COMPGEN --hostname string 'Container hostname'
    COMPGEN --isolation string 'Service container isolation mode'
    COMPGEN '-l' list 'Service labels'
    COMPGEN --label list 'Service labels'
    COMPGEN --limit-cpu decimal 'Limit CPUs'
    COMPGEN --limit-memory bytes 'Limit Memory'
    COMPGEN --log-driver string 'Logging driver for service'
    COMPGEN --log-opt list 'Logging driver options'
    COMPGEN --mode string 'Service mode (replicated or global)'
    COMPGEN --mount mount 'Attach a filesystem mount to the service'
    COMPGEN --name string 'Service name'
    COMPGEN --network network 'Network attachments'
    COMPGEN --no-healthcheck Switch 'Disable any container-specified HEALTHCHECK'
    COMPGEN --no-resolve-image Switch 'Do not query the registry to resolve image digest and supported platforms'
    COMPGEN --placement-pref pref 'Add a placement preference'
    COMPGEN '-p' port 'Publish a port as a node port'
    COMPGEN --publish port 'Publish a port as a node port'
    COMPGEN '-q' Switch 'Suppress progress output'
    COMPGEN --quiet Switch 'Suppress progress output'
    COMPGEN --read-only Switch 'Mount the container''s root filesystem as read only'
    COMPGEN --replicas uint 'Number of tasks'
    COMPGEN --reserve-cpu decimal 'Reserve CPUs'
    COMPGEN --reserve-memory bytes 'Reserve Memory'
    COMPGEN --restart-condition string 'Restart when condition is met ("none"|"on-failure"|"any") (default "any")'
    COMPGEN --restart-delay duration 'Delay between restart attempts (ns|us|ms|s|m|h) (default 5s)'
    COMPGEN --restart-max-attempts uint 'Maximum number of restarts before giving up'
    COMPGEN --restart-window duration 'Window used to evaluate the restart policy (ns|us|ms|s|m|h)'
    COMPGEN --rollback-delay duration 'Delay between task rollbacks (ns|us|ms|s|m|h) (default 0s)'
    COMPGEN --rollback-failure-action string 'Action on rollback failure ("pause"|"continue") (default "pause")'
    COMPGEN --rollback-max-failure-ratio float 'Failure rate to tolerate during a rollback (default 0)'
    COMPGEN --rollback-monitor duration 'Duration after each task rollback to monitor for failure (ns|us|ms|s|m|h) (default 5s)'
    COMPGEN --rollback-order string 'Rollback order ("start-first"|"stop-first") (default "stop-first")'
    COMPGEN --rollback-parallelism uint 'Maximum number of tasks rolled back simultaneously (0 to roll back all at once)'
    COMPGEN --secret secret 'Specify secrets to expose to the service'
    COMPGEN --stop-grace-period duration 'Time to wait before force killing a container (ns|us|ms|s|m|h) (default 10s)'
    COMPGEN --stop-signal string 'Signal to stop the container'
    COMPGEN '-t' Switch 'Allocate a pseudo-TTY'
    COMPGEN --tty Switch 'Allocate a pseudo-TTY'
    COMPGEN --update-delay duration 'Delay between updates (ns|us|ms|s|m|h) (default 0s)'
    COMPGEN --update-failure-action string 'Action on update failure ("pause"|"continue"|"rollback") (default "pause")'
    COMPGEN --update-max-failure-ratio float 'Failure rate to tolerate during an update (default 0)'
    COMPGEN --update-monitor duration 'Duration after each task update to monitor for failure (ns|us|ms|s|m|h) (default 5s)'
    COMPGEN --update-order string 'Update order ("start-first"|"stop-first") (default "stop-first")'
    COMPGEN --update-parallelism uint 'Maximum number of tasks updated simultaneously (0 to update all at once)'
    COMPGEN '-u' string 'Username or UID (format: <name|uid>[:<group|gid>])'
    COMPGEN --user string 'Username or UID (format: <name|uid>[:<group|gid>])'
    COMPGEN --with-registry-auth Switch 'Send registry authentication details to swarm agents'
    COMPGEN '-w' string 'Working directory inside the container'
    COMPGEN --workdir string 'Working directory inside the container'
}

Register-Completer docker_service_inspect -Option {
    COMPGEN '-f' string 'Format the output using the given Go template'
    COMPGEN --format string 'Format the output using the given Go template'
    COMPGEN --pretty Switch 'Print the information in a human friendly format'
}

Register-Completer docker_service_logs -Option {
    COMPGEN --details Switch 'Show extra details provided to logs'
    COMPGEN '-f' Switch 'Follow log output'
    COMPGEN --follow Switch 'Follow log output'
    COMPGEN --no-resolve Switch 'Do not map IDs to Names in output'
    COMPGEN --no-task-ids Switch 'Do not include task IDs in output'
    COMPGEN --no-trunc Switch 'Do not truncate output'
    COMPGEN --raw Switch 'Do not neatly format logs'
    COMPGEN --since string 'Show logs since timestamp (e.g. 2013-01-02T13:23:37) or relative (e.g. 42m for 42 minutes)'
    COMPGEN --tail string 'Number of lines to show from the end of the logs'
    COMPGEN '-t' Switch 'Show timestamps'
    COMPGEN --timestamps Switch 'Show timestamps'
}

Register-Completer docker_service_ls -Option {
    COMPGEN '-f' filter 'Filter output based on conditions provided'
    COMPGEN --filter filter 'Filter output based on conditions provided'
    COMPGEN --format string 'Pretty-print services using a Go template'
    COMPGEN '-q' Switch 'Only display IDs'
    COMPGEN --quiet Switch 'Only display IDs'
}

Register-Completer docker_service_ps -Option {
    COMPGEN '-f' filter 'Filter output based on conditions provided'
    COMPGEN --filter filter 'Filter output based on conditions provided'
    COMPGEN --format string 'Pretty-print tasks using a Go template'
    COMPGEN --no-resolve Switch 'Do not map IDs to Names'
    COMPGEN --no-trunc Switch 'Do not truncate output'
    COMPGEN '-q' Switch 'Only display task IDs'
    COMPGEN --quiet Switch 'Only display task IDs'
}

Register-Completer docker_service_rollback -Option {
    COMPGEN '-d' Switch 'Exit immediately instead of waiting for the service to converge'
    COMPGEN --detach Switch 'Exit immediately instead of waiting for the service to converge'
    COMPGEN '-q' Switch 'Suppress progress output'
    COMPGEN --quiet Switch 'Suppress progress output'
}

Register-Completer docker_service_scale -Option {
    COMPGEN '-d' Switch 'Exit immediately instead of waiting for the service to converge'
    COMPGEN --detach Switch 'Exit immediately instead of waiting for the service to converge'
}

Register-Completer docker_service_update -Option {
    COMPGEN --args command 'Service command args'
    COMPGEN --config-add config 'Add or update a config file on a service'
    COMPGEN --config-rm list 'Remove a configuration file'
    COMPGEN --constraint-add list 'Add or update a placement constraint'
    COMPGEN --constraint-rm list 'Remove a constraint'
    COMPGEN --container-label-add list 'Add or update a container label'
    COMPGEN --container-label-rm list 'Remove a container label by its key'
    COMPGEN --credential-spec credential-spec 'Credential spec for managed service account (Windows only)'
    COMPGEN '-d' Switch 'Exit immediately instead of waiting for the service to converge'
    COMPGEN --detach Switch 'Exit immediately instead of waiting for the service to converge'
    COMPGEN --dns-add list 'Add or update a custom DNS server'
    COMPGEN --dns-option-add list 'Add or update a DNS option'
    COMPGEN --dns-option-rm list 'Remove a DNS option'
    COMPGEN --dns-rm list 'Remove a custom DNS server'
    COMPGEN --dns-search-add list 'Add or update a custom DNS search domain'
    COMPGEN --dns-search-rm list 'Remove a DNS search domain'
    COMPGEN --endpoint-mode string 'Endpoint mode (vip or dnsrr)'
    COMPGEN --entrypoint command 'Overwrite the default ENTRYPOINT of the image'
    COMPGEN --env-add list 'Add or update an environment variable'
    COMPGEN --env-rm list 'Remove an environment variable'
    COMPGEN --force Switch 'Force update even if no changes require it'
    COMPGEN --generic-resource-add list 'Add a Generic resource'
    COMPGEN --generic-resource-rm list 'Remove a Generic resource'
    COMPGEN --group-add list 'Add an additional supplementary user group to the container'
    COMPGEN --group-rm list 'Remove a previously added supplementary user group from the container'
    COMPGEN --health-cmd string 'Command to run to check health'
    COMPGEN --health-interval duration 'Time between running the check (ms|s|m|h)'
    COMPGEN --health-retries int 'Consecutive failures needed to report unhealthy'
    COMPGEN --health-start-period duration 'Start period for the container to initialize before counting retries towards unstable (ms|s|m|h)'
    COMPGEN --health-timeout duration 'Maximum time to allow one check to run (ms|s|m|h)'
    COMPGEN --host-add list 'Add a custom host-to-IP mapping (host:ip)'
    COMPGEN --host-rm list 'Remove a custom host-to-IP mapping (host:ip)'
    COMPGEN --hostname string 'Container hostname'
    COMPGEN --image string 'Service image tag'
    COMPGEN --isolation string 'Service container isolation mode'
    COMPGEN --label-add list 'Add or update a service label'
    COMPGEN --label-rm list 'Remove a label by its key'
    COMPGEN --limit-cpu decimal 'Limit CPUs'
    COMPGEN --limit-memory bytes 'Limit Memory'
    COMPGEN --log-driver string 'Logging driver for service'
    COMPGEN --log-opt list 'Logging driver options'
    COMPGEN --mount-add mount 'Add or update a mount on a service'
    COMPGEN --mount-rm list 'Remove a mount by its target path'
    COMPGEN --network-add network 'Add a network'
    COMPGEN --network-rm list 'Remove a network'
    COMPGEN --no-healthcheck Switch 'Disable any container-specified HEALTHCHECK'
    COMPGEN --no-resolve-image Switch 'Do not query the registry to resolve image digest and supported platforms'
    COMPGEN --placement-pref-add pref 'Add a placement preference'
    COMPGEN --placement-pref-rm pref 'Remove a placement preference'
    COMPGEN --publish-add port 'Add or update a published port'
    COMPGEN --publish-rm port 'Remove a published port by its target port'
    COMPGEN '-q' Switch 'Suppress progress output'
    COMPGEN --quiet Switch 'Suppress progress output'
    COMPGEN --read-only Switch 'Mount the container''s root filesystem as read only'
    COMPGEN --replicas uint 'Number of tasks'
    COMPGEN --reserve-cpu decimal 'Reserve CPUs'
    COMPGEN --reserve-memory bytes 'Reserve Memory'
    COMPGEN --restart-condition string 'Restart when condition is met ("none"|"on-failure"|"any")'
    COMPGEN --restart-delay duration 'Delay between restart attempts (ns|us|ms|s|m|h)'
    COMPGEN --restart-max-attempts uint 'Maximum number of restarts before giving up'
    COMPGEN --restart-window duration 'Window used to evaluate the restart policy (ns|us|ms|s|m|h)'
    COMPGEN --rollback Switch 'Rollback to previous specification'
    COMPGEN --rollback-delay duration 'Delay between task rollbacks (ns|us|ms|s|m|h)'
    COMPGEN --rollback-failure-action string 'Action on rollback failure ("pause"|"continue")'
    COMPGEN --rollback-max-failure-ratio float 'Failure rate to tolerate during a rollback'
    COMPGEN --rollback-monitor duration 'Duration after each task rollback to monitor for failure (ns|us|ms|s|m|h)'
    COMPGEN --rollback-order string 'Rollback order ("start-first"|"stop-first")'
    COMPGEN --rollback-parallelism uint 'Maximum number of tasks rolled back simultaneously (0 to roll back all at once)'
    COMPGEN --secret-add secret 'Add or update a secret on a service'
    COMPGEN --secret-rm list 'Remove a secret'
    COMPGEN --stop-grace-period duration 'Time to wait before force killing a container (ns|us|ms|s|m|h)'
    COMPGEN --stop-signal string 'Signal to stop the container'
    COMPGEN '-t' Switch 'Allocate a pseudo-TTY'
    COMPGEN --tty Switch 'Allocate a pseudo-TTY'
    COMPGEN --update-delay duration 'Delay between updates (ns|us|ms|s|m|h)'
    COMPGEN --update-failure-action string 'Action on update failure ("pause"|"continue"|"rollback")'
    COMPGEN --update-max-failure-ratio float 'Failure rate to tolerate during an update'
    COMPGEN --update-monitor duration 'Duration after each task update to monitor for failure (ns|us|ms|s|m|h)'
    COMPGEN --update-order string 'Update order ("start-first"|"stop-first")'
    COMPGEN --update-parallelism uint 'Maximum number of tasks updated simultaneously (0 to update all at once)'
    COMPGEN '-u' string 'Username or UID (format: <name|uid>[:<group|gid>])'
    COMPGEN --user string 'Username or UID (format: <name|uid>[:<group|gid>])'
    COMPGEN --with-registry-auth Switch 'Send registry authentication details to swarm agents'
    COMPGEN '-w' string 'Working directory inside the container'
    COMPGEN --workdir string 'Working directory inside the container'
}

Register-Completer docker_stack {
    COMPGEN deploy SubCommand 'Deploy a new stack or update an existing stack'
    COMPGEN ls SubCommand 'List stacks'
    COMPGEN ps SubCommand 'List the tasks in the stack'
    COMPGEN rm SubCommand 'Remove one or more stacks'
    COMPGEN services SubCommand 'List the services in the stack'
}
Register-Completer docker_stack -Option {
    COMPGEN --kubeconfig string 'Kubernetes config file'
    COMPGEN --namespace string 'Kubernetes namespace to use'
}

Register-Completer docker_stack_deploy -Option {
    COMPGEN --bundle-file string 'Path to a Distributed Application Bundle file'
    COMPGEN '-c' strings 'Path to a Compose file'
    COMPGEN --compose-file strings 'Path to a Compose file'
    COMPGEN --prune Switch 'Prune services that are no longer referenced'
    COMPGEN --resolve-image string 'Query the registry to resolve image digest and supported platforms ("always"|"changed"|"never")'
    COMPGEN --with-registry-auth Switch 'Send registry authentication details to Swarm agents'
}

Register-Completer docker_stack_ls -Option {
    COMPGEN --format string 'Pretty-print stacks using a Go template'
}

Register-Completer docker_stack_ps -Option {
    COMPGEN '-f' filter 'Filter output based on conditions provided'
    COMPGEN --filter filter 'Filter output based on conditions provided'
    COMPGEN --format string 'Pretty-print tasks using a Go template'
    COMPGEN --no-resolve Switch 'Do not map IDs to Names'
    COMPGEN --no-trunc Switch 'Do not truncate output'
    COMPGEN '-q' Switch 'Only display task IDs'
    COMPGEN --quiet Switch 'Only display task IDs'
}

Register-Completer docker_stack_services -Option {
    COMPGEN '-f' filter 'Filter output based on conditions provided'
    COMPGEN --filter filter 'Filter output based on conditions provided'
    COMPGEN --format string 'Pretty-print services using a Go template'
    COMPGEN '-q' Switch 'Only display IDs'
    COMPGEN --quiet Switch 'Only display IDs'
}

Register-Completer docker_swarm {
    COMPGEN ca SubCommand 'Display and rotate the root CA'
    COMPGEN init SubCommand 'Initialize a swarm'
    COMPGEN join SubCommand 'Join a swarm as a node and/or manager'
    COMPGEN join-token SubCommand 'Manage join tokens'
    COMPGEN leave SubCommand 'Leave the swarm'
    COMPGEN unlock SubCommand 'Unlock swarm'
    COMPGEN unlock-key SubCommand 'Manage the unlock key'
    COMPGEN update SubCommand 'Update the swarm'
}

Register-Completer docker_swarm_ca -Option {
    COMPGEN --ca-cert pem-file 'Path to the PEM-formatted root CA certificate to use for the new cluster'
    COMPGEN --ca-key pem-file 'Path to the PEM-formatted root CA key to use for the new cluster'
    COMPGEN --cert-expiry duration 'Validity period for node certificates (ns|us|ms|s|m|h)'
    COMPGEN '-d' Switch 'Exit immediately instead of waiting for the root rotation to converge'
    COMPGEN --detach Switch 'Exit immediately instead of waiting for the root rotation to converge'
    COMPGEN --external-ca external-ca 'Specifications of one or more certificate signing endpoints'
    COMPGEN '-q' Switch 'Suppress progress output'
    COMPGEN --quiet Switch 'Suppress progress output'
    COMPGEN --rotate Switch 'Rotate the swarm CA - if no certificate or key are provided, new ones will be generated'
}

Register-Completer docker_swarm_init -Option {
    COMPGEN --advertise-addr string 'Advertised address (format: <ip|interface>[:port])'
    COMPGEN --autolock Switch 'Enable manager autolocking (requiring an unlock key to start a stopped manager)'
    COMPGEN --availability string 'Availability of the node ("active"|"pause"|"drain")'
    COMPGEN --cert-expiry duration 'Validity period for node certificates (ns|us|ms|s|m|h)'
    COMPGEN --data-path-addr string 'Address or interface to use for data path traffic (format: <ip|interface>)'
    COMPGEN --dispatcher-heartbeat duration 'Dispatcher heartbeat period (ns|us|ms|s|m|h)'
    COMPGEN --external-ca external-ca 'Specifications of one or more certificate signing endpoints'
    COMPGEN --force-new-cluster Switch 'Force create a new cluster from current state'
    COMPGEN --listen-addr node-addr 'Listen address (format: <ip|interface>[:port])'
    COMPGEN --max-snapshots uint 'Number of additional Raft snapshots to retain'
    COMPGEN --snapshot-interval uint 'Number of log entries between Raft snapshots'
    COMPGEN --task-history-limit int 'Task history retention limit'
}

Register-Completer docker_swarm_join-token -Option {
    COMPGEN '-q' Switch 'Only display token'
    COMPGEN --quiet Switch 'Only display token'
    COMPGEN --rotate Switch 'Rotate join token'
}

Register-Completer docker_swarm_join -Option {
    COMPGEN --advertise-addr string 'Advertised address (format: <ip|interface>[:port])'
    COMPGEN --availability string 'Availability of the node ("active"|"pause"|"drain")'
    COMPGEN --data-path-addr string 'Address or interface to use for data path traffic (format: <ip|interface>)'
    COMPGEN --listen-addr node-addr 'Listen address (format: <ip|interface>[:port])'
    COMPGEN --token string 'Token for entry into the swarm'
}

Register-Completer docker_swarm_leave -Option {
    COMPGEN '-f' Switch 'Force this node to leave the swarm, ignoring warnings'
    COMPGEN --force Switch 'Force this node to leave the swarm, ignoring warnings'
}

Register-Completer docker_swarm_unlock-key -Option {
    COMPGEN '-q' Switch 'Only display token'
    COMPGEN --quiet Switch 'Only display token'
    COMPGEN --rotate Switch 'Rotate unlock key'
}

Register-Completer docker_swarm_update -Option {
    COMPGEN --autolock Switch 'Change manager autolocking setting (true|false)'
    COMPGEN --cert-expiry duration 'Validity period for node certificates (ns|us|ms|s|m|h)'
    COMPGEN --dispatcher-heartbeat duration 'Dispatcher heartbeat period (ns|us|ms|s|m|h)'
    COMPGEN --external-ca external-ca 'Specifications of one or more certificate signing endpoints'
    COMPGEN --max-snapshots uint 'Number of additional Raft snapshots to retain'
    COMPGEN --snapshot-interval uint 'Number of log entries between Raft snapshots'
    COMPGEN --task-history-limit int 'Task history retention limit'
}

Register-Completer docker_system {
    COMPGEN df SubCommand 'Show docker disk usage'
    COMPGEN events SubCommand 'Get real time events from the server'
    COMPGEN info SubCommand 'Display system-wide information'
    COMPGEN prune SubCommand 'Remove unused data'
}

Register-Completer docker_system_df -Option {
    COMPGEN --format string 'Pretty-print images using a Go template'
    COMPGEN '-v' Switch 'Show detailed information on space usage'
    COMPGEN --verbose Switch 'Show detailed information on space usage'
}

Register-Completer docker_system_events -Option {
    COMPGEN '-f' filter 'Filter output based on conditions provided'
    COMPGEN --filter filter 'Filter output based on conditions provided'
    COMPGEN --format string 'Format the output using the given Go template'
    COMPGEN --since string 'Show all events created since timestamp'
    COMPGEN --until string 'Stream events until this timestamp'
}

Register-Completer docker_system_info -Option {
    COMPGEN '-f' string 'Format the output using the given Go template'
    COMPGEN --format string 'Format the output using the given Go template'
}

Register-Completer docker_system_prune -Option {
    COMPGEN '-a' Switch 'Remove all unused images not just dangling ones'
    COMPGEN --all Switch 'Remove all unused images not just dangling ones'
    COMPGEN --filter filter 'Provide filter values (e.g. ''label=<key>=<value>'')'
    COMPGEN '-f' Switch 'Do not prompt for confirmation'
    COMPGEN --force Switch 'Do not prompt for confirmation'
    COMPGEN --volumes Switch 'Prune volumes'
}

Register-Completer docker_trust {
    COMPGEN key ManagementCommand 'Manage keys for signing Docker images'
    COMPGEN signer ManagementCommand 'Manage entities who can sign Docker images'
    COMPGEN inspect SubCommand 'Return low-level information about keys and signatures'
    COMPGEN revoke SubCommand 'Remove trust for an image'
    COMPGEN sign SubCommand 'Sign an image'
}

Register-Completer docker_trust_inspect -Option {
    COMPGEN --pretty Switch 'Print the information in a human friendly format'
}

Register-Completer docker_trust_key {
    COMPGEN generate SubCommand 'Generate and load a signing key-pair'
    COMPGEN load SubCommand 'Load a private key file for signing'
}

Register-Completer docker_trust_key_generate -Option {
    COMPGEN --dir string 'Directory to generate key in, defaults to current directory'
}

Register-Completer docker_trust_key_load -Option {
    COMPGEN --name string 'Name for the loaded key'
}

Register-Completer docker_trust_revoke -Option {
    COMPGEN '-y' Switch 'Do not prompt for confirmation'
    COMPGEN --yes Switch 'Do not prompt for confirmation'
}

Register-Completer docker_trust_sign -Option {
    COMPGEN --local Switch 'Sign a locally tagged image'
}

Register-Completer docker_trust_signer {
    COMPGEN add SubCommand 'Add a signer'
    COMPGEN remove SubCommand 'Remove a signer'
}

Register-Completer docker_trust_signer_add -Option {
    COMPGEN --key list 'Path to the signer''s public key file'
}

Register-Completer docker_trust_signer_remove -Option {
    COMPGEN '-f' Switch 'Do not prompt for confirmation before removing the most recent signer'
    COMPGEN --force Switch 'Do not prompt for confirmation before removing the most recent signer'
}

Register-Completer docker_volume {
    COMPGEN create SubCommand 'Create a volume'
    COMPGEN inspect SubCommand 'Display detailed information on one or more volumes'
    COMPGEN ls SubCommand 'List volumes'
    COMPGEN prune SubCommand 'Remove all unused local volumes'
    COMPGEN rm SubCommand 'Remove one or more volumes'
}

Register-Completer docker_volume_create -Option {
    COMPGEN '-d' string 'Specify volume driver name'
    COMPGEN --driver string 'Specify volume driver name'
    COMPGEN --label list 'Set metadata for a volume'
    COMPGEN '-o' map 'Set driver specific options'
    COMPGEN --opt map 'Set driver specific options'
}

Register-Completer docker_volume_inspect -Option {
    COMPGEN '-f' string 'Format the output using the given Go template'
    COMPGEN --format string 'Format the output using the given Go template'
}

Register-Completer docker_volume_ls -Option {
    COMPGEN '-f' filter 'Provide filter values (e.g. ''dangling=true'')'
    COMPGEN --filter filter 'Provide filter values (e.g. ''dangling=true'')'
    COMPGEN --format string 'Pretty-print volumes using a Go template'
    COMPGEN '-q' Switch 'Only display volume names'
    COMPGEN --quiet Switch 'Only display volume names'
}

Register-Completer docker_volume_prune -Option {
    COMPGEN --filter filter 'Provide filter values (e.g. ''label=<label>'')'
    COMPGEN '-f' Switch 'Do not prompt for confirmation'
    COMPGEN --force Switch 'Do not prompt for confirmation'
}

Register-Completer docker_volume_rm -Option {
    COMPGEN '-f' Switch 'Force the removal of one or more volumes'
    COMPGEN --force Switch 'Force the removal of one or more volumes'
}

Register-Completer docker_build -Option {
    COMPGEN --add-host list 'Add a custom host-to-IP mapping (host:ip)'
    COMPGEN --build-arg list 'Set build-time variables'
    COMPGEN --cache-from strings 'Images to consider as cache sources'
    COMPGEN --cgroup-parent string 'Optional parent cgroup for the container'
    COMPGEN --compress Switch 'Compress the build context using gzip'
    COMPGEN --cpu-period int 'Limit the CPU CFS (Completely Fair Scheduler) period'
    COMPGEN --cpu-quota int 'Limit the CPU CFS (Completely Fair Scheduler) quota'
    COMPGEN '-c' int 'CPU shares (relative weight)'
    COMPGEN --cpu-shares int 'CPU shares (relative weight)'
    COMPGEN --cpuset-cpus string 'CPUs in which to allow execution (0-3, 0,1)'
    COMPGEN --cpuset-mems string 'MEMs in which to allow execution (0-3, 0,1)'
    COMPGEN --disable-content-trust Switch 'Skip image verification'
    COMPGEN '-f' string 'Name of the Dockerfile (Default is ''PATH/Dockerfile'')'
    COMPGEN --file string 'Name of the Dockerfile (Default is ''PATH/Dockerfile'')'
    COMPGEN --force-rm Switch 'Always remove intermediate containers'
    COMPGEN --iidfile string 'Write the image ID to the file'
    COMPGEN --isolation string 'Container isolation technology'
    COMPGEN --label list 'Set metadata for an image'
    COMPGEN '-m' bytes 'Memory limit'
    COMPGEN --memory bytes 'Memory limit'
    COMPGEN --memory-swap bytes 'Swap limit equal to memory plus swap: ''-1'' to enable unlimited swap'
    COMPGEN --network string 'Set the networking mode for the RUN instructions during build'
    COMPGEN --no-cache Switch 'Do not use cache when building the image'
    COMPGEN --platform string 'Set platform if server is multi-platform capable'
    COMPGEN --pull Switch 'Always attempt to pull a newer version of the image'
    COMPGEN '-q' Switch 'Suppress the build output and print image ID on success'
    COMPGEN --quiet Switch 'Suppress the build output and print image ID on success'
    COMPGEN --rm Switch 'Remove intermediate containers after a successful build'
    COMPGEN --security-opt strings 'Security options'
    COMPGEN --shm-size bytes 'Size of /dev/shm'
    COMPGEN --squash Switch 'Squash newly built layers into a single new layer'
    COMPGEN --stream Switch 'Stream attaches to server to negotiate build context'
    COMPGEN '-t' list 'Name and optionally a tag in the ''name:tag'' format'
    COMPGEN --tag list 'Name and optionally a tag in the ''name:tag'' format'
    COMPGEN --target string 'Set the target build stage to build.'
    COMPGEN --ulimit ulimit 'Ulimit options'
}

Register-Completer docker_login -Option {
    COMPGEN '-p' string 'Password'
    COMPGEN --password string 'Password'
    COMPGEN --password-stdin Switch 'Take the password from stdin'
    COMPGEN '-u' string 'Username'
    COMPGEN --username string 'Username'
}

Register-Completer docker_run -Option {
    COMPGEN --add-host list 'Add a custom host-to-IP mapping (host:ip)'
    COMPGEN '-a' list 'Attach to STDIN, STDOUT or STDERR'
    COMPGEN --attach list 'Attach to STDIN, STDOUT or STDERR'
    COMPGEN --blkio-weight uint16 'Block IO (relative weight), between 10 and 1000, or 0 to disable (default 0)'
    COMPGEN --blkio-weight-device list 'Block IO weight (relative device weight)'
    COMPGEN --cap-add list 'Add Linux capabilities'
    COMPGEN --cap-drop list 'Drop Linux capabilities'
    COMPGEN --cgroup-parent string 'Optional parent cgroup for the container'
    COMPGEN --cidfile string 'Write the container ID to the file'
    COMPGEN --cpu-count int 'CPU count (Windows only)'
    COMPGEN --cpu-percent int 'CPU percent (Windows only)'
    COMPGEN --cpu-period int 'Limit CPU CFS (Completely Fair Scheduler) period'
    COMPGEN --cpu-quota int 'Limit CPU CFS (Completely Fair Scheduler) quota'
    COMPGEN --cpu-rt-period int 'Limit CPU real-time period in microseconds'
    COMPGEN --cpu-rt-runtime int 'Limit CPU real-time runtime in microseconds'
    COMPGEN '-c' int 'CPU shares (relative weight)'
    COMPGEN --cpu-shares int 'CPU shares (relative weight)'
    COMPGEN --cpus decimal 'Number of CPUs'
    COMPGEN --cpuset-cpus string 'CPUs in which to allow execution (0-3, 0,1)'
    COMPGEN --cpuset-mems string 'MEMs in which to allow execution (0-3, 0,1)'
    COMPGEN '-d' Switch 'Run container in background and print container ID'
    COMPGEN --detach Switch 'Run container in background and print container ID'
    COMPGEN --detach-keys string 'Override the key sequence for detaching a container'
    COMPGEN --device list 'Add a host device to the container'
    COMPGEN --device-cgroup-rule list 'Add a rule to the cgroup allowed devices list'
    COMPGEN --device-read-bps list 'Limit read rate (bytes per second) from a device'
    COMPGEN --device-read-iops list 'Limit read rate (IO per second) from a device'
    COMPGEN --device-write-bps list 'Limit write rate (bytes per second) to a device'
    COMPGEN --device-write-iops list 'Limit write rate (IO per second) to a device'
    COMPGEN --disable-content-trust Switch 'Skip image verification'
    COMPGEN --dns list 'Set custom DNS servers'
    COMPGEN --dns-option list 'Set DNS options'
    COMPGEN --dns-search list 'Set custom DNS search domains'
    COMPGEN --entrypoint string 'Overwrite the default ENTRYPOINT of the image'
    COMPGEN '-e' list 'Set environment variables'
    COMPGEN --env list 'Set environment variables'
    COMPGEN --env-file list 'Read in a file of environment variables'
    COMPGEN --expose list 'Expose a port or a range of ports'
    COMPGEN --group-add list 'Add additional groups to join'
    COMPGEN --health-cmd string 'Command to run to check health'
    COMPGEN --health-interval duration 'Time between running the check (ms|s|m|h) (default 0s)'
    COMPGEN --health-retries int 'Consecutive failures needed to report unhealthy'
    COMPGEN --health-start-period duration 'Start period for the container to initialize before starting health-retries countdown (ms|s|m|h) (default 0s)'
    COMPGEN --health-timeout duration 'Maximum time to allow one check to run (ms|s|m|h) (default 0s)'
    COMPGEN '-h' string 'Container host name'
    COMPGEN --hostname string 'Container host name'
    COMPGEN --init Switch 'Run an init inside the container that forwards signals and reaps processes'
    COMPGEN '-i' Switch 'Keep STDIN open even if not attached'
    COMPGEN --interactive Switch 'Keep STDIN open even if not attached'
    COMPGEN --io-maxbandwidth bytes 'Maximum IO bandwidth limit for the system drive (Windows only)'
    COMPGEN --io-maxiops uint 'Maximum IOps limit for the system drive (Windows only)'
    COMPGEN --ip string 'IPv4 address (e.g., 172.30.100.104)'
    COMPGEN --ip6 string 'IPv6 address (e.g., 2001:db8::33)'
    COMPGEN --ipc string 'IPC mode to use'
    COMPGEN --isolation string 'Container isolation technology'
    COMPGEN --kernel-memory bytes 'Kernel memory limit'
    COMPGEN '-l' list 'Set meta data on a container'
    COMPGEN --label list 'Set meta data on a container'
    COMPGEN --label-file list 'Read in a line delimited file of labels'
    COMPGEN --link list 'Add link to another container'
    COMPGEN --link-local-ip list 'Container IPv4/IPv6 link-local addresses'
    COMPGEN --log-driver string 'Logging driver for the container'
    COMPGEN --log-opt list 'Log driver options'
    COMPGEN --mac-address string 'Container MAC address (e.g., 92:d0:c6:0a:29:33)'
    COMPGEN '-m' bytes 'Memory limit'
    COMPGEN --memory bytes 'Memory limit'
    COMPGEN --memory-reservation bytes 'Memory soft limit'
    COMPGEN --memory-swap bytes 'Swap limit equal to memory plus swap: ''-1'' to enable unlimited swap'
    COMPGEN --memory-swappiness int 'Tune container memory swappiness (0 to 100)'
    COMPGEN --mount mount 'Attach a filesystem mount to the container'
    COMPGEN --name string 'Assign a name to the container'
    COMPGEN --network string 'Connect a container to a network'
    COMPGEN --network-alias list 'Add network-scoped alias for the container'
    COMPGEN --no-healthcheck Switch 'Disable any container-specified HEALTHCHECK'
    COMPGEN --oom-kill-disable Switch 'Disable OOM Killer'
    COMPGEN --oom-score-adj int 'Tune host''s OOM preferences (-1000 to 1000)'
    COMPGEN --pid string 'PID namespace to use'
    COMPGEN --pids-limit int 'Tune container pids limit (set -1 for unlimited)'
    COMPGEN --platform string 'Set platform if server is multi-platform capable'
    COMPGEN --privileged Switch 'Give extended privileges to this container'
    COMPGEN '-p' list 'Publish a container''s port(s) to the host'
    COMPGEN --publish list 'Publish a container''s port(s) to the host'
    COMPGEN '-P' Switch 'Publish all exposed ports to random ports'
    COMPGEN --publish-all Switch 'Publish all exposed ports to random ports'
    COMPGEN --read-only Switch 'Mount the container''s root filesystem as read only'
    COMPGEN --restart string 'Restart policy to apply when a container exits'
    COMPGEN --rm Switch 'Automatically remove the container when it exits'
    COMPGEN --runtime string 'Runtime to use for this container'
    COMPGEN --security-opt list 'Security Options'
    COMPGEN --shm-size bytes 'Size of /dev/shm'
    COMPGEN --sig-proxy Switch 'Proxy received signals to the process'
    COMPGEN --stop-signal string 'Signal to stop a container'
    COMPGEN --stop-timeout int 'Timeout (in seconds) to stop a container'
    COMPGEN --storage-opt list 'Storage driver options for the container'
    COMPGEN --sysctl map 'Sysctl options'
    COMPGEN --tmpfs list 'Mount a tmpfs directory'
    COMPGEN '-t' Switch 'Allocate a pseudo-TTY'
    COMPGEN --tty Switch 'Allocate a pseudo-TTY'
    COMPGEN --ulimit ulimit 'Ulimit options'
    COMPGEN '-u' string 'Username or UID (format: <name|uid>[:<group|gid>])'
    COMPGEN --user string 'Username or UID (format: <name|uid>[:<group|gid>])'
    COMPGEN --userns string 'User namespace to use'
    COMPGEN --uts string 'UTS namespace to use'
    COMPGEN '-v' list 'Bind mount a volume'
    COMPGEN --volume list 'Bind mount a volume'
    COMPGEN --volume-driver string 'Optional volume driver for the container'
    COMPGEN --volumes-from list 'Mount volumes from the specified container(s)'
    COMPGEN '-w' string 'Working directory inside the container'
    COMPGEN --workdir string 'Working directory inside the container'
}

Register-Completer docker_search -Option {
    COMPGEN '-f' filter 'Filter output based on conditions provided'
    COMPGEN --filter filter 'Filter output based on conditions provided'
    COMPGEN --format string 'Pretty-print search using a Go template'
    COMPGEN --limit int 'Max number of search results'
    COMPGEN --no-trunc Switch 'Don''t truncate output'
}

Register-Completer docker_version -Option {
    COMPGEN '-f' string 'Format the output using the given Go template'
    COMPGEN --format string 'Format the output using the given Go template'
}

if ($env:DOCKER_HIDE_LEGACY_COMMANDS) {
    return
}

Register-Completer docker_attach -Option {
    COMPGEN --detach-keys string 'Override the key sequence for detaching a container'
    COMPGEN --no-stdin Switch 'Do not attach STDIN'
    COMPGEN --sig-proxy Switch 'Proxy all received signals to the process'
}

Register-Completer docker_commit -Option {
    COMPGEN '-a' string 'Author (e.g., "John Hannibal Smith <hannibal@a-team.com>")'
    COMPGEN --author string 'Author (e.g., "John Hannibal Smith <hannibal@a-team.com>")'
    COMPGEN '-c' list 'Apply Dockerfile instruction to the created image'
    COMPGEN --change list 'Apply Dockerfile instruction to the created image'
    COMPGEN '-m' string 'Commit message'
    COMPGEN --message string 'Commit message'
    COMPGEN '-p' Switch 'Pause container during commit'
    COMPGEN --pause Switch 'Pause container during commit'
}

Register-Completer docker_cp -Option {
    COMPGEN '-a' Switch 'Archive mode (copy all uid/gid information)'
    COMPGEN --archive Switch 'Archive mode (copy all uid/gid information)'
    COMPGEN '-L' Switch 'Always follow symbol link in SRC_PATH'
    COMPGEN --follow-link Switch 'Always follow symbol link in SRC_PATH'
}

Register-Completer docker_create -Option {
    COMPGEN --add-host list 'Add a custom host-to-IP mapping (host:ip)'
    COMPGEN '-a' list 'Attach to STDIN, STDOUT or STDERR'
    COMPGEN --attach list 'Attach to STDIN, STDOUT or STDERR'
    COMPGEN --blkio-weight uint16 'Block IO (relative weight), between 10 and 1000, or 0 to disable (default 0)'
    COMPGEN --blkio-weight-device list 'Block IO weight (relative device weight)'
    COMPGEN --cap-add list 'Add Linux capabilities'
    COMPGEN --cap-drop list 'Drop Linux capabilities'
    COMPGEN --cgroup-parent string 'Optional parent cgroup for the container'
    COMPGEN --cidfile string 'Write the container ID to the file'
    COMPGEN --cpu-count int 'CPU count (Windows only)'
    COMPGEN --cpu-percent int 'CPU percent (Windows only)'
    COMPGEN --cpu-period int 'Limit CPU CFS (Completely Fair Scheduler) period'
    COMPGEN --cpu-quota int 'Limit CPU CFS (Completely Fair Scheduler) quota'
    COMPGEN --cpu-rt-period int 'Limit CPU real-time period in microseconds'
    COMPGEN --cpu-rt-runtime int 'Limit CPU real-time runtime in microseconds'
    COMPGEN '-c' int 'CPU shares (relative weight)'
    COMPGEN --cpu-shares int 'CPU shares (relative weight)'
    COMPGEN --cpus decimal 'Number of CPUs'
    COMPGEN --cpuset-cpus string 'CPUs in which to allow execution (0-3, 0,1)'
    COMPGEN --cpuset-mems string 'MEMs in which to allow execution (0-3, 0,1)'
    COMPGEN --device list 'Add a host device to the container'
    COMPGEN --device-cgroup-rule list 'Add a rule to the cgroup allowed devices list'
    COMPGEN --device-read-bps list 'Limit read rate (bytes per second) from a device'
    COMPGEN --device-read-iops list 'Limit read rate (IO per second) from a device'
    COMPGEN --device-write-bps list 'Limit write rate (bytes per second) to a device'
    COMPGEN --device-write-iops list 'Limit write rate (IO per second) to a device'
    COMPGEN --disable-content-trust Switch 'Skip image verification'
    COMPGEN --dns list 'Set custom DNS servers'
    COMPGEN --dns-option list 'Set DNS options'
    COMPGEN --dns-search list 'Set custom DNS search domains'
    COMPGEN --entrypoint string 'Overwrite the default ENTRYPOINT of the image'
    COMPGEN '-e' list 'Set environment variables'
    COMPGEN --env list 'Set environment variables'
    COMPGEN --env-file list 'Read in a file of environment variables'
    COMPGEN --expose list 'Expose a port or a range of ports'
    COMPGEN --group-add list 'Add additional groups to join'
    COMPGEN --health-cmd string 'Command to run to check health'
    COMPGEN --health-interval duration 'Time between running the check (ms|s|m|h) (default 0s)'
    COMPGEN --health-retries int 'Consecutive failures needed to report unhealthy'
    COMPGEN --health-start-period duration 'Start period for the container to initialize before starting health-retries countdown (ms|s|m|h) (default 0s)'
    COMPGEN --health-timeout duration 'Maximum time to allow one check to run (ms|s|m|h) (default 0s)'
    COMPGEN '-h' string 'Container host name'
    COMPGEN --hostname string 'Container host name'
    COMPGEN --init Switch 'Run an init inside the container that forwards signals and reaps processes'
    COMPGEN '-i' Switch 'Keep STDIN open even if not attached'
    COMPGEN --interactive Switch 'Keep STDIN open even if not attached'
    COMPGEN --io-maxbandwidth bytes 'Maximum IO bandwidth limit for the system drive (Windows only)'
    COMPGEN --io-maxiops uint 'Maximum IOps limit for the system drive (Windows only)'
    COMPGEN --ip string 'IPv4 address (e.g., 172.30.100.104)'
    COMPGEN --ip6 string 'IPv6 address (e.g., 2001:db8::33)'
    COMPGEN --ipc string 'IPC mode to use'
    COMPGEN --isolation string 'Container isolation technology'
    COMPGEN --kernel-memory bytes 'Kernel memory limit'
    COMPGEN '-l' list 'Set meta data on a container'
    COMPGEN --label list 'Set meta data on a container'
    COMPGEN --label-file list 'Read in a line delimited file of labels'
    COMPGEN --link list 'Add link to another container'
    COMPGEN --link-local-ip list 'Container IPv4/IPv6 link-local addresses'
    COMPGEN --log-driver string 'Logging driver for the container'
    COMPGEN --log-opt list 'Log driver options'
    COMPGEN --mac-address string 'Container MAC address (e.g., 92:d0:c6:0a:29:33)'
    COMPGEN '-m' bytes 'Memory limit'
    COMPGEN --memory bytes 'Memory limit'
    COMPGEN --memory-reservation bytes 'Memory soft limit'
    COMPGEN --memory-swap bytes 'Swap limit equal to memory plus swap: ''-1'' to enable unlimited swap'
    COMPGEN --memory-swappiness int 'Tune container memory swappiness (0 to 100)'
    COMPGEN --mount mount 'Attach a filesystem mount to the container'
    COMPGEN --name string 'Assign a name to the container'
    COMPGEN --network string 'Connect a container to a network'
    COMPGEN --network-alias list 'Add network-scoped alias for the container'
    COMPGEN --no-healthcheck Switch 'Disable any container-specified HEALTHCHECK'
    COMPGEN --oom-kill-disable Switch 'Disable OOM Killer'
    COMPGEN --oom-score-adj int 'Tune host''s OOM preferences (-1000 to 1000)'
    COMPGEN --pid string 'PID namespace to use'
    COMPGEN --pids-limit int 'Tune container pids limit (set -1 for unlimited)'
    COMPGEN --platform string 'Set platform if server is multi-platform capable'
    COMPGEN --privileged Switch 'Give extended privileges to this container'
    COMPGEN '-p' list 'Publish a container''s port(s) to the host'
    COMPGEN --publish list 'Publish a container''s port(s) to the host'
    COMPGEN '-P' Switch 'Publish all exposed ports to random ports'
    COMPGEN --publish-all Switch 'Publish all exposed ports to random ports'
    COMPGEN --read-only Switch 'Mount the container''s root filesystem as read only'
    COMPGEN --restart string 'Restart policy to apply when a container exits'
    COMPGEN --rm Switch 'Automatically remove the container when it exits'
    COMPGEN --runtime string 'Runtime to use for this container'
    COMPGEN --security-opt list 'Security Options'
    COMPGEN --shm-size bytes 'Size of /dev/shm'
    COMPGEN --stop-signal string 'Signal to stop a container'
    COMPGEN --stop-timeout int 'Timeout (in seconds) to stop a container'
    COMPGEN --storage-opt list 'Storage driver options for the container'
    COMPGEN --sysctl map 'Sysctl options'
    COMPGEN --tmpfs list 'Mount a tmpfs directory'
    COMPGEN '-t' Switch 'Allocate a pseudo-TTY'
    COMPGEN --tty Switch 'Allocate a pseudo-TTY'
    COMPGEN --ulimit ulimit 'Ulimit options'
    COMPGEN '-u' string 'Username or UID (format: <name|uid>[:<group|gid>])'
    COMPGEN --user string 'Username or UID (format: <name|uid>[:<group|gid>])'
    COMPGEN --userns string 'User namespace to use'
    COMPGEN --uts string 'UTS namespace to use'
    COMPGEN '-v' list 'Bind mount a volume'
    COMPGEN --volume list 'Bind mount a volume'
    COMPGEN --volume-driver string 'Optional volume driver for the container'
    COMPGEN --volumes-from list 'Mount volumes from the specified container(s)'
    COMPGEN '-w' string 'Working directory inside the container'
    COMPGEN --workdir string 'Working directory inside the container'
}

Register-Completer docker_deploy -Option {
    COMPGEN --bundle-file string 'Path to a Distributed Application Bundle file'
    COMPGEN '-c' strings 'Path to a Compose file'
    COMPGEN --compose-file strings 'Path to a Compose file'
    COMPGEN --prune Switch 'Prune services that are no longer referenced'
    COMPGEN --resolve-image string 'Query the registry to resolve image digest and supported platforms ("always"|"changed"|"never")'
    COMPGEN --with-registry-auth Switch 'Send registry authentication details to Swarm agents'
}

Register-Completer docker_events -Option {
    COMPGEN '-f' filter 'Filter output based on conditions provided'
    COMPGEN --filter filter 'Filter output based on conditions provided'
    COMPGEN --format string 'Format the output using the given Go template'
    COMPGEN --since string 'Show all events created since timestamp'
    COMPGEN --until string 'Stream events until this timestamp'
}

Register-Completer docker_exec -Option {
    COMPGEN '-d' Switch 'Detached mode: run command in the background'
    COMPGEN --detach Switch 'Detached mode: run command in the background'
    COMPGEN --detach-keys string 'Override the key sequence for detaching a container'
    COMPGEN '-e' list 'Set environment variables'
    COMPGEN --env list 'Set environment variables'
    COMPGEN '-i' Switch 'Keep STDIN open even if not attached'
    COMPGEN --interactive Switch 'Keep STDIN open even if not attached'
    COMPGEN --privileged Switch 'Give extended privileges to the command'
    COMPGEN '-t' Switch 'Allocate a pseudo-TTY'
    COMPGEN --tty Switch 'Allocate a pseudo-TTY'
    COMPGEN '-u' string 'Username or UID (format: <name|uid>[:<group|gid>])'
    COMPGEN --user string 'Username or UID (format: <name|uid>[:<group|gid>])'
    COMPGEN '-w' string 'Working directory inside the container'
    COMPGEN --workdir string 'Working directory inside the container'
}

Register-Completer docker_export -Option {
    COMPGEN '-o' string 'Write to a file, instead of STDOUT'
    COMPGEN --output string 'Write to a file, instead of STDOUT'
}

Register-Completer docker_history -Option {
    COMPGEN --format string 'Pretty-print images using a Go template'
    COMPGEN '-H' Switch 'Print sizes and dates in human readable format'
    COMPGEN --human Switch 'Print sizes and dates in human readable format'
    COMPGEN --no-trunc Switch 'Don''t truncate output'
    COMPGEN '-q' Switch 'Only show numeric IDs'
    COMPGEN --quiet Switch 'Only show numeric IDs'
}

Register-Completer docker_images -Option {
    COMPGEN '-a' Switch 'Show all images (default hides intermediate images)'
    COMPGEN --all Switch 'Show all images (default hides intermediate images)'
    COMPGEN --digests Switch 'Show digests'
    COMPGEN '-f' filter 'Filter output based on conditions provided'
    COMPGEN --filter filter 'Filter output based on conditions provided'
    COMPGEN --format string 'Pretty-print images using a Go template'
    COMPGEN --no-trunc Switch 'Don''t truncate output'
    COMPGEN '-q' Switch 'Only show numeric IDs'
    COMPGEN --quiet Switch 'Only show numeric IDs'
}

Register-Completer docker_import -Option {
    COMPGEN '-c' list 'Apply Dockerfile instruction to the created image'
    COMPGEN --change list 'Apply Dockerfile instruction to the created image'
    COMPGEN '-m' string 'Set commit message for imported image'
    COMPGEN --message string 'Set commit message for imported image'
}

Register-Completer docker_info -Option {
    COMPGEN '-f' string 'Format the output using the given Go template'
    COMPGEN --format string 'Format the output using the given Go template'
}

Register-Completer docker_inspect -Option {
    COMPGEN '-f' string 'Format the output using the given Go template'
    COMPGEN --format string 'Format the output using the given Go template'
    COMPGEN '-s' Switch 'Display total file sizes if the type is container'
    COMPGEN --size Switch 'Display total file sizes if the type is container'
    COMPGEN --type string 'Return JSON for specified type'
}

Register-Completer docker_kill -Option {
    COMPGEN '-s' string 'Signal to send to the container'
    COMPGEN --signal string 'Signal to send to the container'
}

Register-Completer docker_load -Option {
    COMPGEN '-i' string 'Read from tar archive file, instead of STDIN'
    COMPGEN --input string 'Read from tar archive file, instead of STDIN'
    COMPGEN '-q' Switch 'Suppress the load output'
    COMPGEN --quiet Switch 'Suppress the load output'
}

Register-Completer docker_logs -Option {
    COMPGEN --details Switch 'Show extra details provided to logs'
    COMPGEN '-f' Switch 'Follow log output'
    COMPGEN --follow Switch 'Follow log output'
    COMPGEN --since string 'Show logs since timestamp (e.g. 2013-01-02T13:23:37) or relative (e.g. 42m for 42 minutes)'
    COMPGEN --tail string 'Number of lines to show from the end of the logs'
    COMPGEN '-t' Switch 'Show timestamps'
    COMPGEN --timestamps Switch 'Show timestamps'
    COMPGEN --until string 'Show logs before a timestamp (e.g. 2013-01-02T13:23:37) or relative (e.g. 42m for 42 minutes)'
}

Register-Completer docker_ps -Option {
    COMPGEN '-a' Switch 'Show all containers (default shows just running)'
    COMPGEN --all Switch 'Show all containers (default shows just running)'
    COMPGEN '-f' filter 'Filter output based on conditions provided'
    COMPGEN --filter filter 'Filter output based on conditions provided'
    COMPGEN --format string 'Pretty-print containers using a Go template'
    COMPGEN '-n' int 'Show n last created containers (includes all states)'
    COMPGEN --last int 'Show n last created containers (includes all states)'
    COMPGEN '-l' Switch 'Show the latest created container (includes all states)'
    COMPGEN --latest Switch 'Show the latest created container (includes all states)'
    COMPGEN --no-trunc Switch 'Don''t truncate output'
    COMPGEN '-q' Switch 'Only display numeric IDs'
    COMPGEN --quiet Switch 'Only display numeric IDs'
    COMPGEN '-s' Switch 'Display total file sizes'
    COMPGEN --size Switch 'Display total file sizes'
}

Register-Completer docker_pull -Option {
    COMPGEN '-a' Switch 'Download all tagged images in the repository'
    COMPGEN --all-tags Switch 'Download all tagged images in the repository'
    COMPGEN --disable-content-trust Switch 'Skip image verification'
    COMPGEN --platform string 'Set platform if server is multi-platform capable'
}

Register-Completer docker_push -Option {
    COMPGEN --disable-content-trust Switch 'Skip image signing'
}

Register-Completer docker_restart -Option {
    COMPGEN '-t' int 'Seconds to wait for stop before killing the container'
    COMPGEN --time int 'Seconds to wait for stop before killing the container'
}

Register-Completer docker_rm -Option {
    COMPGEN '-f' Switch 'Force the removal of a running container (uses SIGKILL)'
    COMPGEN --force Switch 'Force the removal of a running container (uses SIGKILL)'
    COMPGEN '-l' Switch 'Remove the specified link'
    COMPGEN --link Switch 'Remove the specified link'
    COMPGEN '-v' Switch 'Remove the volumes associated with the container'
    COMPGEN --volumes Switch 'Remove the volumes associated with the container'
}

Register-Completer docker_rmi -Option {
    COMPGEN '-f' Switch 'Force removal of the image'
    COMPGEN --force Switch 'Force removal of the image'
    COMPGEN --no-prune Switch 'Do not delete untagged parents'
}

Register-Completer docker_save -Option {
    COMPGEN '-o' string 'Write to a file, instead of STDOUT'
    COMPGEN --output string 'Write to a file, instead of STDOUT'
}

Register-Completer docker_start -Option {
    COMPGEN '-a' Switch 'Attach STDOUT/STDERR and forward signals'
    COMPGEN --attach Switch 'Attach STDOUT/STDERR and forward signals'
    COMPGEN --checkpoint string 'Restore from this checkpoint'
    COMPGEN --checkpoint-dir string 'Use a custom checkpoint storage directory'
    COMPGEN --detach-keys string 'Override the key sequence for detaching a container'
    COMPGEN '-i' Switch 'Attach container''s STDIN'
    COMPGEN --interactive Switch 'Attach container''s STDIN'
}

Register-Completer docker_stats -Option {
    COMPGEN '-a' Switch 'Show all containers (default shows just running)'
    COMPGEN --all Switch 'Show all containers (default shows just running)'
    COMPGEN --format string 'Pretty-print images using a Go template'
    COMPGEN --no-stream Switch 'Disable streaming stats and only pull the first result'
    COMPGEN --no-trunc Switch 'Do not truncate output'
}

Register-Completer docker_stop -Option {
    COMPGEN '-t' int 'Seconds to wait for stop before killing it'
    COMPGEN --time int 'Seconds to wait for stop before killing it'
}

Register-Completer docker_update -Option {
    COMPGEN --blkio-weight uint16 'Block IO (relative weight), between 10 and 1000, or 0 to disable (default 0)'
    COMPGEN --cpu-period int 'Limit CPU CFS (Completely Fair Scheduler) period'
    COMPGEN --cpu-quota int 'Limit CPU CFS (Completely Fair Scheduler) quota'
    COMPGEN --cpu-rt-period int 'Limit the CPU real-time period in microseconds'
    COMPGEN --cpu-rt-runtime int 'Limit the CPU real-time runtime in microseconds'
    COMPGEN '-c' int 'CPU shares (relative weight)'
    COMPGEN --cpu-shares int 'CPU shares (relative weight)'
    COMPGEN --cpus decimal 'Number of CPUs'
    COMPGEN --cpuset-cpus string 'CPUs in which to allow execution (0-3, 0,1)'
    COMPGEN --cpuset-mems string 'MEMs in which to allow execution (0-3, 0,1)'
    COMPGEN --kernel-memory bytes 'Kernel memory limit'
    COMPGEN '-m' bytes 'Memory limit'
    COMPGEN --memory bytes 'Memory limit'
    COMPGEN --memory-reservation bytes 'Memory soft limit'
    COMPGEN --memory-swap bytes 'Swap limit equal to memory plus swap: ''-1'' to enable unlimited swap'
    COMPGEN --restart string 'Restart policy to apply when a container exits'
}