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

docker-compose: allow specific commands to take services from file #10638

Conversation

adamwojt
Copy link

@adamwojt adamwojt commented Jan 29, 2022

resolves #10636

Standards checklist:

  • The PR title is descriptive.
  • The PR doesn't replicate another PR which is already open.
  • I have read the contribution guide and followed all the instructions.
  • The code follows the code style guide detailed in the wiki.
  • The code is mine or it's from somewhere with an MIT-compatible license.
  • The code is efficient, to the best of my ability, and does not waste computer resources.
  • The code is stable and I have tested it myself, to the best of my abilities.

Changes:

  • for build, create, images, pull, push, run, up take services using docker-compose config --services (parses file), for rest: take it from docker-compose ps --services (have to have container).
  • for __docker-compose_stoppedservices include exited status too (this is what you can get when stopping container)

Other comments:

  • tested on 1.29 and 2.23, works as intended
  • it's not the pretties as __docker-compose_all_services_in_compose_file and __docker-compose_all_services_with_container share some similar code, same with __docker-compose_services_in_compose_file_pre and __docker-compose_services_with_container_pre but I wasn't sure how to refactor it properly as I am not that good at bash.

@ohmyzsh ohmyzsh bot added Area: plugin Issue or PR related to a plugin Topic: completion Pull Request or issue regarding completion labels Jan 29, 2022
@hound672
Copy link

hound672 commented Dec 3, 2023

Is this PR will be merged to main?
since it fixes docker-compose autocompllete

@carlosala
Copy link
Member

Closing, see #10636 (comment) for more info.

@carlosala carlosala closed this Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: plugin Issue or PR related to a plugin Topic: completion Pull Request or issue regarding completion
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

docker-compose plugin service names only if container exists ?
3 participants