bash completion for daemon events

Signed-off-by: Harald Albers <github@albersweb.de>
This commit is contained in:
Harald Albers 2016-05-24 17:19:03 +02:00 committed by Tibor Vass
parent b47dd5295d
commit b4242ed63b
1 changed files with 8 additions and 2 deletions

View File

@ -966,6 +966,11 @@ _docker_events() {
__docker_complete_containers_all __docker_complete_containers_all
return return
;; ;;
daemon)
local name=$(__docker_q info | sed -n 's/^\(ID\|Name\): //p')
COMPREPLY=( $( compgen -W "$name" -- "${cur##*=}" ) )
return
;;
event) event)
COMPREPLY=( $( compgen -W " COMPREPLY=( $( compgen -W "
attach attach
@ -987,6 +992,7 @@ _docker_events() {
pause pause
pull pull
push push
reload
rename rename
resize resize
restart restart
@ -1012,7 +1018,7 @@ _docker_events() {
return return
;; ;;
type) type)
COMPREPLY=( $( compgen -W "container image network volume" -- "${cur##*=}" ) ) COMPREPLY=( $( compgen -W "container daemon image network volume" -- "${cur##*=}" ) )
return return
;; ;;
volume) volume)
@ -1024,7 +1030,7 @@ _docker_events() {
case "$prev" in case "$prev" in
--filter|-f) --filter|-f)
COMPREPLY=( $( compgen -S = -W "container event image label network type volume" -- "$cur" ) ) COMPREPLY=( $( compgen -S = -W "container daemon event image label network type volume" -- "$cur" ) )
__docker_nospace __docker_nospace
return return
;; ;;