Skip to content

Add bash completion for profiles and a command to list profiles#8061

Merged
chris-crone merged 2 commits into
docker:masterfrom
albers:completion-profiles
Mar 30, 2021
Merged

Add bash completion for profiles and a command to list profiles#8061
chris-crone merged 2 commits into
docker:masterfrom
albers:completion-profiles

Conversation

@albers

@albers albers commented Jan 22, 2021

Copy link
Copy Markdown

This adds bash completion for docker-compose --profile, which was added in #7930.

In order to complete valid profiles, we need a portable way to get a list of profiles used in the current config.

For that purpose, a new option docker-compose config --profiles was added.
It works like the --services and --volumes options.

I'm new to python development, so I guess there's a more elegant idiom for collecting the profiles.
I appreciate any help here.

@albers
albers force-pushed the completion-profiles branch 4 times, most recently from b7ff7d8 to b900158 Compare January 22, 2021 17:10
For command completion of `docker-compose --profile`, we need a portable
way to get a list of profiles used in the current config.

This commit adds a new option `docker-compose config --profiles`.

Signed-off-by: Harald Albers <[email protected]>
@albers
albers force-pushed the completion-profiles branch from b900158 to 4e382b9 Compare January 22, 2021 19:25
@albers albers changed the title WIP: Add bash completion for profiles Add bash completion for profiles Jan 22, 2021
@albers
albers marked this pull request as ready for review January 22, 2021 20:07
@thaJeztah

Copy link
Copy Markdown
Member

@aiordache @ulyssessouza ptal

@aiordache aiordache added this to the 1.29.0 milestone Feb 25, 2021
@albers albers changed the title Add bash completion for profiles Add bash completion for profiles and a command to list profiles Mar 23, 2021

@chris-crone chris-crone left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@thaJeztah

Copy link
Copy Markdown
Member

Thanks!

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.

docker-compose config --profiles equivalent to docker-compose config --services

4 participants