Skip to content

Commit c59038b

Browse files
committed
Add bash completion for "local" log driver
Ref: moby/moby#37092 Also adds log-opt `compress` to json-file log driver because this was also added in the referenced PR. Signed-off-by: Harald Albers <[email protected]>
1 parent 504cecf commit c59038b

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

contrib/completion/bash/docker

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -881,6 +881,7 @@ __docker_complete_log_drivers() {
881881
gelf
882882
journald
883883
json-file
884+
local
884885
logentries
885886
none
886887
splunk
@@ -904,7 +905,8 @@ __docker_complete_log_options() {
904905
local gcplogs_options="$common_options1 $common_options2 gcp-log-cmd gcp-meta-id gcp-meta-name gcp-meta-zone gcp-project"
905906
local gelf_options="$common_options1 $common_options2 gelf-address gelf-compression-level gelf-compression-type gelf-tcp-max-reconnect gelf-tcp-reconnect-delay tag"
906907
local journald_options="$common_options1 $common_options2 tag"
907-
local json_file_options="$common_options1 $common_options2 max-file max-size"
908+
local json_file_options="$common_options1 $common_options2 compress max-file max-size"
909+
local local_options="$common_options1 compress max-file max-size"
908910
local logentries_options="$common_options1 $common_options2 line-only logentries-token tag"
909911
local splunk_options="$common_options1 $common_options2 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"
910912
local syslog_options="$common_options1 $common_options2 syslog-address syslog-facility syslog-format syslog-tls-ca-cert syslog-tls-cert syslog-tls-key syslog-tls-skip-verify tag"
@@ -933,6 +935,9 @@ __docker_complete_log_options() {
933935
json-file)
934936
COMPREPLY=( $( compgen -W "$json_file_options" -S = -- "$cur" ) )
935937
;;
938+
local)
939+
COMPREPLY=( $( compgen -W "$local_options" -S = -- "$cur" ) )
940+
;;
936941
logentries)
937942
COMPREPLY=( $( compgen -W "$logentries_options" -S = -- "$cur" ) )
938943
;;
@@ -962,7 +967,7 @@ __docker_complete_log_driver_options() {
962967
__docker_nospace
963968
return
964969
;;
965-
fluentd-async-connect)
970+
compress|fluentd-async-connect)
966971
COMPREPLY=( $( compgen -W "false true" -- "${cur##*=}" ) )
967972
return
968973
;;

0 commit comments

Comments
 (0)