Skip to content

Commit

Permalink
Merge pull request #11251 from ndeloof/completion_disabled
Browse files Browse the repository at this point in the history
include disabled services for shell completion
  • Loading branch information
glours authored Dec 6, 2023
2 parents 862f2a1 + bdbda79 commit 30e80d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/compose/completion.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ func completeServiceNames(dockerCli command.Cli, p *ProjectOptions) validArgsFn
if err != nil {
return nil, cobra.ShellCompDirectiveNoFileComp
}
var serviceNames []string
for _, s := range project.ServiceNames() {
serviceNames := append(project.ServiceNames(), project.DisabledServiceNames()...)
for _, s := range serviceNames {
if toComplete == "" || strings.HasPrefix(s, toComplete) {
serviceNames = append(serviceNames, s)
}
Expand Down

0 comments on commit 30e80d2

Please sign in to comment.