Browse code

Add completion for `--filter desired-state=shutdown`

Signed-off-by: Harald Albers <github@albersweb.de>

Harald Albers authored on 2017/02/24 21:27:32
Showing 2 changed files
... ...
@@ -2906,7 +2906,7 @@ _docker_service_ps() {
2906 2906
 	local key=$(__docker_map_key_of_current_option '--filter|-f')
2907 2907
 	case "$key" in
2908 2908
 		desired-state)
2909
-			COMPREPLY=( $( compgen -W "accepted running" -- "${cur##*=}" ) )
2909
+			COMPREPLY=( $( compgen -W "accepted running shutdown" -- "${cur##*=}" ) )
2910 2910
 			return
2911 2911
 			;;
2912 2912
 		name)
... ...
@@ -3391,7 +3391,7 @@ _docker_node_ps() {
3391 3391
 	local key=$(__docker_map_key_of_current_option '--filter|-f')
3392 3392
 	case "$key" in
3393 3393
 		desired-state)
3394
-			COMPREPLY=( $( compgen -W "accepted running" -- "${cur##*=}" ) )
3394
+			COMPREPLY=( $( compgen -W "accepted running shutdown" -- "${cur##*=}" ) )
3395 3395
 			return
3396 3396
 			;;
3397 3397
 		name)
... ...
@@ -3880,7 +3880,7 @@ _docker_stack_ps() {
3880 3880
 	local key=$(__docker_map_key_of_current_option '--filter|-f')
3881 3881
 	case "$key" in
3882 3882
 		desired-state)
3883
-			COMPREPLY=( $( compgen -W "accepted running" -- "${cur##*=}" ) )
3883
+			COMPREPLY=( $( compgen -W "accepted running shutdown" -- "${cur##*=}" ) )
3884 3884
 			return
3885 3885
 			;;
3886 3886
 		id)
... ...
@@ -1344,7 +1344,7 @@ __docker_node_complete_ps_filters() {
1344 1344
     if compset -P '*='; then
1345 1345
         case "${${words[-1]%=*}#*=}" in
1346 1346
             (desired-state)
1347
-                state_opts=('accepted' 'running')
1347
+                state_opts=('accepted' 'running' 'shutdown')
1348 1348
                 _describe -t state-opts "desired state options" state_opts && ret=0
1349 1349
                 ;;
1350 1350
             *)
... ...
@@ -1784,7 +1784,7 @@ __docker_service_complete_ps_filters() {
1784 1784
     if compset -P '*='; then
1785 1785
         case "${${words[-1]%=*}#*=}" in
1786 1786
             (desired-state)
1787
-                state_opts=('accepted' 'running')
1787
+                state_opts=('accepted' 'running' 'shutdown')
1788 1788
                 _describe -t state-opts "desired state options" state_opts && ret=0
1789 1789
                 ;;
1790 1790
             *)
... ...
@@ -2040,7 +2040,7 @@ __docker_stack_complete_ps_filters() {
2040 2040
     if compset -P '*='; then
2041 2041
         case "${${words[-1]%=*}#*=}" in
2042 2042
             (desired-state)
2043
-                state_opts=('accepted' 'running')
2043
+                state_opts=('accepted' 'running' 'shutdown')
2044 2044
                 _describe -t state-opts "desired state options" state_opts && ret=0
2045 2045
                 ;;
2046 2046
             *)