3d6db3261082d8f8c2c7dc7d5b94dbcc4ff0b00e

Author
YantaoZhao <zhytsh15@126.com>
Committer
GitHub <noreply@github.com>
Date

Message

feat(docker): update completion to upstream version (#9470)

Diff

 1diff --git a/plugins/docker/_docker b/plugins/docker/_docker
 2index 10c19e2339f80006d9784cf167a54e6eb6d4cbd8..7fe2043132b6808949263750550814362dcfa327 100644
 3--- a/plugins/docker/_docker
 4+++ b/plugins/docker/_docker
 5@@ -624,7 +624,8 @@ __docker_container_subcommand() {
 6         "($help)--entrypoint=[Overwrite the default entrypoint of the image]:entry point: "
 7         "($help)*--env-file=[Read environment variables from a file]:environment file:_files"
 8         "($help)*--expose=[Expose a port from the container without publishing it]: "
 9-        "($help)*--group=[Set one or more supplementary user groups for the container]:group:_groups"
10+        "($help)*--gpus=[GPU devices to add to the container ('all' to pass all GPUs)]:device: "
11+        "($help)*--group-add=[Set one or more supplementary user groups for the container]:group:_groups"
12         "($help -h --hostname)"{-h=,--hostname=}"[Container host name]:hostname:_hosts"
13         "($help -i --interactive)"{-i,--interactive}"[Keep stdin open even if not attached]"
14         "($help)--init[Run an init inside the container that forwards signals and reaps processes]"
15@@ -750,6 +751,7 @@ __docker_container_subcommand() {
16                 $opts_attach_exec_run_start \
17                 "($help -d --detach)"{-d,--detach}"[Detached mode: leave the container running in the background]" \
18                 "($help)*"{-e=,--env=}"[Set environment variables]:environment variable: " \
19+                "($help)*--env-file=[Read environment variables from a file]:environment file:_files" \
20                 "($help -i --interactive)"{-i,--interactive}"[Keep stdin open even if not attached]" \
21                 "($help)--privileged[Give extended Linux capabilities to the command]" \
22                 "($help -t --tty)"{-t,--tty}"[Allocate a pseudo-tty]" \
23@@ -791,7 +793,7 @@ __docker_container_subcommand() {
24                 "($help -f --follow)"{-f,--follow}"[Follow log output]" \
25                 "($help -s --since)"{-s=,--since=}"[Show logs since this timestamp]:timestamp: " \
26                 "($help -t --timestamps)"{-t,--timestamps}"[Show timestamps]" \
27-                "($help)--tail=[Output the last K lines]:lines:(1 10 20 50 all)" \
28+                "($help -n --tail)"{-n=,--tail=}"[Number of lines to show from the end of the logs]:lines:(1 10 20 50 all)" \
29                 "($help -)*:containers:__docker_complete_containers" && ret=0
30             ;;
31         (ls|list)
32@@ -1018,6 +1020,7 @@ __docker_image_subcommand() {
33                 "($help)*--shm-size=[Size of '/dev/shm' (format is '<number><unit>')]:shm size: " \
34                 "($help)--squash[Squash newly built layers into a single new layer]" \
35                 "($help -t --tag)*"{-t=,--tag=}"[Repository, name and tag for the image]: :__docker_complete_repositories_with_tags" \
36+                "($help)--target=[Set the target build stage to build.]" \
37                 "($help)*--ulimit=[ulimit options]:ulimit: " \
38                 "($help)--userns=[Container user namespace]:user namespace:(host)" \
39                 "($help -):path or URL:_directories" && ret=0
40@@ -1958,6 +1961,8 @@ __docker_service_subcommand() {
41 
42     opts_help=("(: -)--help[Print usage]")
43     opts_create_update=(
44+        "($help)*--cap-add=[Add Linux capabilities]:capability: "
45+        "($help)*--cap-drop=[Drop Linux capabilities]:capability: "
46         "($help)*--constraint=[Placement constraints]:constraint: "
47         "($help)--endpoint-mode=[Placement constraints]:mode:(dnsrr vip)"
48         "($help)*"{-e=,--env=}"[Set environment variables]:env: "
49@@ -1970,6 +1975,7 @@ __docker_service_subcommand() {
50         "($help)*--label=[Service labels]:label: "
51         "($help)--limit-cpu=[Limit CPUs]:value: "
52         "($help)--limit-memory=[Limit Memory]:value: "
53+        "($help)--limit-pids[Limit maximum number of processes (default 0 = unlimited)]"
54         "($help)--log-driver=[Logging driver for service]:logging driver:__docker_complete_log_drivers"
55         "($help)*--log-opt=[Logging driver options]:log driver options:__docker_complete_log_options"
56         "($help)*--mount=[Attach a filesystem mount to the service]:mount: "
57@@ -2012,6 +2018,7 @@ __docker_service_subcommand() {
58                 "($help)*--dns-option=[Set DNS options]:DNS option: " \
59                 "($help)*--dns-search=[Set custom DNS search domains]:DNS search: " \
60                 "($help)*--env-file=[Read environment variables from a file]:environment file:_files" \
61+                "($help)*--group=[Set one or more supplementary user groups for the container]:group: _groups " \
62                 "($help)--mode=[Service Mode]:mode:(global replicated)" \
63                 "($help)--name=[Service name]:name: " \
64                 "($help)*--placement-pref=[Add a placement preference]:pref:__docker_service_complete_placement_pref" \
65@@ -2035,7 +2042,7 @@ __docker_service_subcommand() {
66                 "($help)--no-task-ids[Do not include task IDs]" \
67                 "($help)--no-trunc[Do not truncate output]" \
68                 "($help)--since=[Show logs since timestamp]:timestamp: " \
69-                "($help)--tail=[Number of lines to show from the end of the logs]:lines:(1 10 20 50 all)" \
70+                "($help -n --tail)"{-n=,--tail=}"[Number of lines to show from the end of the logs]:lines:(1 10 20 50 all)" \
71                 "($help -t --timestamps)"{-t,--timestamps}"[Show timestamps]" \
72                 "($help -)1:service:__docker_complete_services" && ret=0
73             ;;
74@@ -2639,6 +2646,8 @@ __docker_subcommand() {
75                 "($help)*--cluster-store-opt=[Cluster store options]:Cluster options:->cluster-store-options" \
76                 "($help)--config-file=[Path to daemon configuration file]:Config File:_files" \
77                 "($help)--containerd=[Path to containerd socket]:socket:_files -g \"*.sock\"" \
78+                "($help)--containerd-namespace=[Containerd namespace to use]:containerd namespace:" \
79+                "($help)--containerd-plugins-namespace=[Containerd namespace to use for plugins]:containerd namespace:" \
80                 "($help)--data-root=[Root directory of persisted Docker data]:path:_directories" \
81                 "($help -D --debug)"{-D,--debug}"[Enable debug mode]" \
82                 "($help)--default-gateway[Container default gateway IPv4 address]:IPv4 address: " \