Skip to content

Commit fc3598f

Browse files
muzmuayyad-alsadi
authored andcommitted
Allow --services in config
Signed-off-by: Muz <git@mustaqila.li>
1 parent fbff315 commit fc3598f

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

podman_compose.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2282,7 +2282,10 @@ def compose_logs(compose, args):
22822282

22832283

22842284
@cmd_run(podman_compose, "config", "displays the compose file")
2285-
def compose_config(compose, args): # pylint: disable=unused-argument
2285+
def compose_config(compose, args):
2286+
if args.services:
2287+
for service in compose.services: print(service)
2288+
return
22862289
print(compose.merged_yaml)
22872290

22882291

@@ -2663,6 +2666,15 @@ def compose_build_parse(parser):
26632666
)
26642667

26652668

2669+
@cmd_parse(podman_compose, "config")
2670+
def compose_config_parse(parser):
2671+
parser.add_argument(
2672+
"--services",
2673+
help="Print the service names, one per line.",
2674+
action="store_true"
2675+
)
2676+
2677+
26662678
def main():
26672679
podman_compose.run()
26682680

0 commit comments

Comments
 (0)