From e49d13fc0260e539cb4625bbad5cb11169d5933b Mon Sep 17 00:00:00 2001 From: Harald Albers Date: Thu, 2 Feb 2017 09:18:50 +0100 Subject: [PATCH] Add bash completion for `{dockerd,docker run} --log-opt max-buffer-size|mode` Signed-off-by: Harald Albers --- contrib/completion/bash/docker | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/contrib/completion/bash/docker b/contrib/completion/bash/docker index 008d55dfef..5c9cc6c937 100644 --- a/contrib/completion/bash/docker +++ b/contrib/completion/bash/docker @@ -712,16 +712,18 @@ __docker_complete_log_drivers() { } __docker_complete_log_options() { - # see docs/reference/logging/index.md - local awslogs_options="awslogs-region awslogs-group awslogs-stream awslogs-create-group" - local fluentd_options="env fluentd-address fluentd-async-connect fluentd-buffer-limit fluentd-retry-wait fluentd-max-retries labels tag" - local gcplogs_options="env gcp-log-cmd gcp-project labels" - local gelf_options="env gelf-address gelf-compression-level gelf-compression-type labels tag" - local journald_options="env labels tag" - local json_file_options="env labels max-file max-size" - local logentries_options="logentries-token" - local 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" - local splunk_options="env labels splunk-caname splunk-capath splunk-format splunk-gzip splunk-gzip-level splunk-index splunk-insecureskipverify splunk-source splunk-sourcetype splunk-token splunk-url splunk-verify-connection tag" + # see repository docker/docker.github.io/engine/admin/logging/ + local common_options="max-buffer-size mode" + + local awslogs_options="$common_options awslogs-region awslogs-group awslogs-stream awslogs-create-group" + local fluentd_options="$common_options env fluentd-address fluentd-async-connect fluentd-buffer-limit fluentd-retry-wait fluentd-max-retries labels tag" + local gcplogs_options="$common_options env gcp-log-cmd gcp-project labels" + local gelf_options="$common_options env gelf-address gelf-compression-level gelf-compression-type labels tag" + local journald_options="$common_options env labels tag" + local json_file_options="$common_options env labels max-file max-size" + local logentries_options="$common_options logentries-token" + local syslog_options="$common_options env labels syslog-address syslog-facility syslog-format syslog-tls-ca-cert syslog-tls-cert syslog-tls-key syslog-tls-skip-verify tag" + local splunk_options="$common_options env labels splunk-caname splunk-capath splunk-format splunk-gzip splunk-gzip-level splunk-index splunk-insecureskipverify splunk-source splunk-sourcetype splunk-token splunk-url splunk-verify-connection tag" local all_options="$fluentd_options $gcplogs_options $gelf_options $journald_options $logentries_options $json_file_options $syslog_options $splunk_options" @@ -784,6 +786,10 @@ __docker_complete_log_driver_options() { COMPREPLY=( $( compgen -W "gzip none zlib" -- "${cur##*=}" ) ) return ;; + mode) + COMPREPLY=( $( compgen -W "blocking nonblocking" -- "${cur##*=}" ) ) + return + ;; syslog-address) COMPREPLY=( $( compgen -W "tcp:// tcp+tls:// udp:// unix://" -- "${cur##*=}" ) ) __docker_nospace