浏览代码

Merge pull request #30638 from albers/completion-ps-filter-by-ports

Add bash completion for `docker ps --filter expose|publish`
Kenfe-Mickaël Laventure 8 年之前
父节点
当前提交
9f8a7b6b45
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      contrib/completion/bash/docker

+ 4 - 1
contrib/completion/bash/docker

@@ -1286,6 +1286,9 @@ _docker_container_ls() {
 			__docker_complete_containers_all --cur "${cur##*=}"
 			return
 			;;
+		expose|publish)
+			return
+			;;
 		id)
 			__docker_complete_containers_all --cur "${cur##*=}" --id
 			return
@@ -1322,7 +1325,7 @@ _docker_container_ls() {
 
 	case "$prev" in
 		--filter|-f)
-			COMPREPLY=( $( compgen -S = -W "ancestor before exited health id is-task label name network since status volume" -- "$cur" ) )
+			COMPREPLY=( $( compgen -S = -W "ancestor before exited expose health id is-task label name network publish since status volume" -- "$cur" ) )
 			__docker_nospace
 			return
 			;;