Преглед изворни кода

Fix docker-compose zsh running service name completion

This applies to commands that operate on running services. For example: top, stop, restart, etc.

Configuring a custom psFormat in ~/.docker/config.json can break zsh
running service name completion that depends upon default `docker ps`
output. This breaks when you don't include the output needed by
completion.

The fix specifies the explicit format needed for completion and is based
on a previous fix in the docker CLI completion: https://github.com/docker/cli/commit/8b38343e46e46b589bf556651c10dc3dbee3f88b

Signed-off-by: Wes Higbee <[email protected]>
Wes Higbee пре 7 година
родитељ
комит
e7f0ab04a1
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      contrib/completion/zsh/_docker-compose

+ 1 - 1
contrib/completion/zsh/_docker-compose

@@ -88,7 +88,7 @@ __docker-compose_get_services() {
     shift
     [[ $kind =~ (stopped|all) ]] && args=($args -a)
 
-    lines=(${(f)"$(_call_program commands docker $docker_options ps $args)"})
+    lines=(${(f)"$(_call_program commands docker $docker_options ps --format 'table' $args)"})
     services=(${(f)"$(_call_program commands docker-compose 2>/dev/null $compose_options ps -q)"})
 
     # Parse header line to find columns