Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix formatting of description of systemd command #643

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

clebergnu
Copy link
Contributor

When running "podman-compose", the list of commands gets displayed. The systemd command is an outlier, showing multiple lines, IMO unintended at this location.

This change moves the longer command description to its proper place, that is, it gets shown when "podman-compose systemd --help" is executed.

Before this, running podman-compose:

command:
  {help,version,wait,systemd,pull,push,build,up,down,ps,run,exec,start,stop,restart,logs,config,port,pause,unpause,kill}
    help                show help
    version             show version
    wait                wait running containers to stop
    systemd             create systemd unit file and register its compose stacks
                        
                            When first installed type `sudo podman-compose systemd -a create-unit`
                            later you can add a compose stack by running `podman-compose systemd -a register`
                            then you can start/stop your stack with `systemctl --user start podman-compose@<PROJ>`
                            
    pull                pull stack images
    push                push stack images
...

After this, running podman-compose:

...
command:
  {help,version,wait,systemd,pull,push,build,up,down,ps,run,exec,start,stop,restart,logs,config,port,pause,unpause,kill}
    help                show help
    version             show version
    wait                wait running containers to stop
    systemd             create systemd unit file and register its compose stacks
    pull                pull stack images
    push                push stack images
...

And when running podman-compose systemd --help:

usage: podman-compose systemd [-h] [-a {register,create-unit,list,ls}]

When first installed type `sudo podman-compose systemd -a create-unit` later
you can add a compose stack by running `podman-compose systemd -a register`
then you can start/stop your stack with `systemctl --user start podman-
compose@<PROJ>`

options:
  -h, --help            show this help message and exit
  -a {register,create-unit,list,ls}, --action {register,create-unit,list,ls}
                        create systemd unit file or register compose stack to
                        it

@clebergnu clebergnu marked this pull request as ready for review March 10, 2023 20:40
Signed-off-by: Cleber Rosa <crosa@redhat.com>
When running "podman-compose", the list of commands gets displayed.
The systemd command is an outlier, showing multiple lines, IMO
unintended at this location.

This change moves the longer command description to its proper place,
that is, it gets shown when "podman-compose systemd --help" is
executed.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
@clebergnu clebergnu force-pushed the command_help_and_description branch from 2a1e045 to 78ab78c Compare April 10, 2023 09:13
@clebergnu
Copy link
Contributor Author

gentle ping @muayyad-alsadi , can you help with review here?

@muayyad-alsadi
Copy link
Collaborator

Please fix styling using black

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants