Explorar o código

Merge pull request #31891 from ngaro/master

Fix zsh-completion for containers in status 'created'
Sebastiaan van Stijn %!s(int64=8) %!d(string=hai) anos
pai
achega
04da404175
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      contrib/completion/zsh/_docker

+ 2 - 2
contrib/completion/zsh/_docker

@@ -78,7 +78,7 @@ __docker_get_containers() {
             s="${${line[${begin[CONTAINER ID]},${end[CONTAINER ID]}]%% ##}[0,12]}"
             s="$s:${(l:15:: :::)${${line[${begin[CREATED]},${end[CREATED]}]/ ago/}%% ##}}"
             s="$s, ${${${line[${begin[IMAGE]},${end[IMAGE]}]}/:/\\:}%% ##}"
-            if [[ ${line[${begin[STATUS]},${end[STATUS]}]} = Exit* ]]; then
+            if [[ ${line[${begin[STATUS]},${end[STATUS]}]} = (Exit*|Created*) ]]; then
                 stopped=($stopped $s)
             else
                 running=($running $s)
@@ -100,7 +100,7 @@ __docker_get_containers() {
             (( $#s != 0 )) || continue
             s="$s:${(l:15:: :::)${${line[${begin[CREATED]},${end[CREATED]}]/ ago/}%% ##}}"
             s="$s, ${${${line[${begin[IMAGE]},${end[IMAGE]}]}/:/\\:}%% ##}"
-            if [[ ${line[${begin[STATUS]},${end[STATUS]}]} = Exit* ]]; then
+            if [[ ${line[${begin[STATUS]},${end[STATUS]}]} = (Exit*|Created*) ]]; then
                 stopped=($stopped $s)
             else
                 running=($running $s)