From fc3598faf2b07546ba406926bac237e50684bd0a Mon Sep 17 00:00:00 2001 From: Muz Date: Sun, 3 Apr 2022 22:33:53 -0500 Subject: [PATCH] Allow --services in config Signed-off-by: Muz --- podman_compose.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/podman_compose.py b/podman_compose.py index d9b9fad..f7dc0f7 100755 --- a/podman_compose.py +++ b/podman_compose.py @@ -2282,7 +2282,10 @@ def compose_logs(compose, args): @cmd_run(podman_compose, "config", "displays the compose file") -def compose_config(compose, args): # pylint: disable=unused-argument +def compose_config(compose, args): + if args.services: + for service in compose.services: print(service) + return print(compose.merged_yaml) @@ -2663,6 +2666,15 @@ def compose_build_parse(parser): ) +@cmd_parse(podman_compose, "config") +def compose_config_parse(parser): + parser.add_argument( + "--services", + help="Print the service names, one per line.", + action="store_true" + ) + + def main(): podman_compose.run()