9d91e92f26e3cb2d89eb43065ad960e4a344d52c
- Author
- Brian Goff <cpuguy83@gmail.com>
- Committer
- Marc Cornellà <marc.cornella@live.com>
- Date
Message
Diff
This diff is truncated to protect this page.
1diff --git a/plugins/docker/_docker b/plugins/docker/_docker
2index 66dfeea9ef50a5a7142cca0ca41a6a0fe8206855..554379246b7ae8ea5a5547b8d5aead2fa7004669 100644
3--- a/plugins/docker/_docker
4+++ b/plugins/docker/_docker
5@@ -138,7 +138,7 @@ __docker_containers_names() {
6 __docker_get_containers all names "$@"
7 }
8
9-__docker_complete_info_plugins() {
10+__docker_plugins() {
11 [[ $PREFIX = -* ]] && return 1
12 integer ret=1
13 emulate -L zsh
14@@ -228,7 +228,7 @@ __docker_get_log_options() {
15 journald_options=("env" "labels" "tag")
16 json_file_options=("env" "labels" "max-file" "max-size")
17 syslog_options=("env" "labels" "syslog-address" "syslog-facility" "syslog-format" "syslog-tls-ca-cert" "syslog-tls-cert" "syslog-tls-key" "syslog-tls-skip-verify" "tag")
18- splunk_options=("env" "labels" "splunk-caname" "splunk-capath" "splunk-format" "splunk-index" "splunk-insecureskipverify" "splunk-source" "splunk-sourcetype" "splunk-token" "splunk-url" "splunk-verify-connection" "tag")
19+ splunk_options=("env" "labels" "splunk-caname" "splunk-capath" "splunk-index" "splunk-insecureskipverify" "splunk-source" "splunk-sourcetype" "splunk-token" "splunk-url" "tag")
20
21 [[ $log_driver = (awslogs|all) ]] && _describe -t awslogs-options "awslogs options" awslogs_options "$@" && ret=0
22 [[ $log_driver = (fluentd|all) ]] && _describe -t fluentd-options "fluentd options" fluentd_options "$@" && ret=0
23@@ -340,7 +340,7 @@ __docker_complete_ps_filters() {
24 __docker_networks && ret=0
25 ;;
26 (status)
27- status_opts=('created' 'dead' 'exited' 'paused' 'restarting' 'running' 'removing')
28+ status_opts=('created' 'dead' 'exited' 'paused' 'restarting' 'running')
29 _describe -t status-filter-opts "Status Filter Options" status_opts && ret=0
30 ;;
31 (volume)
32@@ -463,8 +463,6 @@ __docker_complete_events_filter() {
33 return ret
34 }
35
36-# BO network
37-
38 __docker_network_complete_ls_filters() {
39 [[ $PREFIX = -* ]] && return 1
40 integer ret=1
41@@ -472,7 +470,7 @@ __docker_network_complete_ls_filters() {
42 if compset -P '*='; then
43 case "${${words[-1]%=*}#*=}" in
44 (driver)
45- __docker_complete_info_plugins Network && ret=0
46+ __docker_plugins Network && ret=0
47 ;;
48 (id)
49 __docker_networks_ids && ret=0
50@@ -631,7 +629,6 @@ __docker_network_subcommand() {
51 $opts_help \
52 "($help)--no-trunc[Do not truncate the output]" \
53 "($help)*"{-f=,--filter=}"[Provide filter values]:filter:->filter-options" \
54- "($help)--format=[Pretty-print networks using a Go template]:template: " \
55 "($help -q --quiet)"{-q,--quiet}"[Only display numeric IDs]" && ret=0
56 case $state in
57 (filter-options)
58@@ -652,8 +649,6 @@ __docker_network_subcommand() {
59 return ret
60 }
61
62-# EO network
63-
64 # BO node
65
66 __docker_node_complete_ls_filters() {
67@@ -721,6 +716,7 @@ __docker_nodes() {
68 [[ $filter != "none" ]] && args=("-f $filter")
69
70 lines=(${(f)"$(_call_program commands docker $docker_options node ls $args)"})
71+
72 # Parse header line to find columns
73 local i=1 j=1 k header=${lines[1]}
74 declare -A begin end
75@@ -846,7 +842,6 @@ __docker_node_subcommand() {
76 "($help -a --all)"{-a,--all}"[Display all instances]" \
77 "($help)*"{-f=,--filter=}"[Provide filter values]:filter:->filter-options" \
78 "($help)--no-resolve[Do not map IDs to Names]" \
79- "($help)--no-trunc[Do not truncate output]" \
80 "($help -)1:node:__docker_complete_nodes" && ret=0
81 case $state in
82 (filter-options)
83@@ -1162,7 +1157,6 @@ __docker_service_subcommand() {
84 "($help -a --all)"{-a,--all}"[Display all tasks]" \
85 "($help)*"{-f=,--filter=}"[Provide filter values]:filter:->filter-options" \
86 "($help)--no-resolve[Do not map IDs to Names]" \
87- "($help)--no-trunc[Do not truncate output]" \
88 "($help -)1:service:__docker_complete_services" && ret=0
89 case $state in
90 (filter-options)
91@@ -1256,8 +1250,6 @@ __docker_swarm_subcommand() {
92
93 # EO swarm
94
95-# BO volume
96-
97 __docker_volume_complete_ls_filters() {
98 [[ $PREFIX = -* ]] && return 1
99 integer ret=1
100@@ -1269,7 +1261,7 @@ __docker_volume_complete_ls_filters() {
101 _describe -t dangling-filter-opts "Dangling Filter Options" dangling_opts && ret=0
102 ;;
103 (driver)
104- __docker_complete_info_plugins Volume && ret=0