mirror of https://github.com/docker/compose.git
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: 8b38343e46
Signed-off-by: Wes Higbee <wes.mcclure@gmail.com>
This commit is contained in:
parent
4e0fdd70bd
commit
e7f0ab04a1
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue