From 99b6776fd2a0896d696152815b6a396d1cc1fcdd Mon Sep 17 00:00:00 2001 From: Harald Albers Date: Sun, 24 Jan 2021 22:14:43 +0000 Subject: [PATCH 1/2] Add bash completion for `logs|up --no-log-prefix` This adds bash completion for https://github.com/docker/compose/pull/7435 Signed-off-by: Harald Albers --- contrib/completion/bash/docker-compose | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/completion/bash/docker-compose b/contrib/completion/bash/docker-compose index 677bbdbb2..ff1a1896e 100644 --- a/contrib/completion/bash/docker-compose +++ b/contrib/completion/bash/docker-compose @@ -294,7 +294,7 @@ _docker_compose_logs() { case "$cur" in -*) - COMPREPLY=( $( compgen -W "--follow -f --help --no-color --tail --timestamps -t" -- "$cur" ) ) + COMPREPLY=( $( compgen -W "--follow -f --help --no-color --no-log-prefix --tail --timestamps -t" -- "$cur" ) ) ;; *) __docker_compose_complete_services @@ -549,7 +549,7 @@ _docker_compose_up() { case "$cur" in -*) - COMPREPLY=( $( compgen -W "--abort-on-container-exit --always-recreate-deps --attach-dependencies --build -d --detach --exit-code-from --force-recreate --help --no-build --no-color --no-deps --no-recreate --no-start --renew-anon-volumes -V --remove-orphans --scale --timeout -t" -- "$cur" ) ) + COMPREPLY=( $( compgen -W "--abort-on-container-exit --always-recreate-deps --attach-dependencies --build -d --detach --exit-code-from --force-recreate --help --no-build --no-color --no-deps --no-log-prefix --no-recreate --no-start --renew-anon-volumes -V --remove-orphans --scale --timeout -t" -- "$cur" ) ) ;; *) __docker_compose_complete_services From 487779960c9a759a6400cf670ba96ef930e81e23 Mon Sep 17 00:00:00 2001 From: Harald Albers Date: Sun, 24 Jan 2021 22:19:37 +0000 Subject: [PATCH 2/2] Fix formatting of help output for `up|logs --no-log-prefix` Signed-off-by: Harald Albers --- compose/cli/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compose/cli/main.py b/compose/cli/main.py index 4cea03be4..9a12c683e 100644 --- a/compose/cli/main.py +++ b/compose/cli/main.py @@ -691,7 +691,7 @@ class TopLevelCommand: -t, --timestamps Show timestamps. --tail="all" Number of lines to show from the end of the logs for each container. - --no-log-prefix Don't print prefix in logs. + --no-log-prefix Don't print prefix in logs. """ containers = self.project.containers(service_names=options['SERVICE'], stopped=True) @@ -1109,7 +1109,7 @@ class TopLevelCommand: container. Implies --abort-on-container-exit. --scale SERVICE=NUM Scale SERVICE to NUM instances. Overrides the `scale` setting in the Compose file if present. - --no-log-prefix Don't print prefix in logs. + --no-log-prefix Don't print prefix in logs. """ start_deps = not options['--no-deps'] always_recreate_deps = options['--always-recreate-deps']