Merge pull request #2002 from thaJeztah/18.09_backport_docs

[18.09 backport] assorted docs and completion script fixes
This commit is contained in:
Kirill Kolyshkin 2019-07-23 14:14:55 -07:00 committed by GitHub
commit 642235d082
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 4 deletions

View File

@ -570,7 +570,7 @@ __docker_append_to_completions() {
# The result is cached for the duration of one invocation of bash completion.
__docker_fetch_info() {
if [ -z "$info_fetched" ] ; then
read -r client_experimental server_experimental server_os < <(__docker_q version -f '{{.Client.Experimental}} {{.Server.Experimental}} {{.Server.Os}}')
read -r client_experimental server_experimental server_os <<< "$(__docker_q version -f '{{.Client.Experimental}} {{.Server.Experimental}} {{.Server.Os}}')"
info_fetched=true
fi
}
@ -4848,6 +4848,10 @@ _docker_system_events() {
__docker_complete_networks --cur "${cur##*=}"
return
;;
node)
__docker_complete_nodes --cur "${cur##*=}"
return
;;
scope)
COMPREPLY=( $( compgen -W "local swarm" -- "${cur##*=}" ) )
return
@ -4864,7 +4868,7 @@ _docker_system_events() {
case "$prev" in
--filter|-f)
COMPREPLY=( $( compgen -S = -W "container daemon event image label network scope type volume" -- "$cur" ) )
COMPREPLY=( $( compgen -S = -W "container daemon event image label network node scope type volume" -- "$cur" ) )
__docker_nospace
return
;;

View File

@ -9,6 +9,7 @@
# - Felix Riedel
# - Steve Durrheimer
# - Vincent Bernat
# - Rohan Verma
#
# license:
#
@ -2781,7 +2782,7 @@ __docker_subcommand() {
$opts_help \
"($help -p --password)"{-p=,--password=}"[Password]:password: " \
"($help)--password-stdin[Read password from stdin]" \
"($help -u --user)"{-u=,--user=}"[Username]:username: " \
"($help -u --username)"{-u=,--username=}"[Username]:username: " \
"($help -)1:server: " && ret=0
;;
(logout)

View File

@ -31,7 +31,12 @@ Options:
## Description
Use `docker events` to get real-time events from the server. These events differ
per Docker object type.
per Docker object type. Different event types have different scopes. Local
scoped events are only seen on the node they take place on, and swarm scoped
events are seen on all managers.
Only the last 1000 log events are returned. You can use filters to further limit
the number of events returned.
### Object types
@ -160,6 +165,9 @@ that have elapsed since January 1, 1970 (midnight UTC/GMT), not counting leap
seconds (aka Unix epoch or Unix time), and the optional .nanoseconds field is a
fraction of a second no more than nine digits long.
Only the last 1000 log events are returned. You can use filters to further limit
the number of events returned.
#### Filtering
The filtering flag (`-f` or `--filter`) format is of "key=value". If you would