浏览代码

Merge pull request #27881 from albers/completion-ps--filter-health

Add bash completion for `docker ps --filter health`
Sebastiaan van Stijn 8 年之前
父节点
当前提交
e1369f2f39
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      contrib/completion/bash/docker

+ 5 - 1
contrib/completion/bash/docker

@@ -1089,6 +1089,10 @@ _docker_container_ls() {
 			__docker_complete_containers_all --cur "${cur##*=}" --id
 			return
 			;;
+		health)
+			COMPREPLY=( $( compgen -W "healthy starting none unhealthy" -- "${cur##*=}" ) )
+			return
+			;;
 		is-task)
 			COMPREPLY=( $( compgen -W "true false" -- "${cur##*=}" ) )
 			return
@@ -1117,7 +1121,7 @@ _docker_container_ls() {
 
 	case "$prev" in
 		--filter|-f)
-			COMPREPLY=( $( compgen -S = -W "ancestor before exited id label name network since status volume" -- "$cur" ) )
+			COMPREPLY=( $( compgen -S = -W "ancestor before exited health id label name network since status volume" -- "$cur" ) )
 			__docker_nospace
 			return
 			;;