From bdbda79043f3fda192bcf4948fcd0036e440def1 Mon Sep 17 00:00:00 2001 From: Nicolas De Loof Date: Wed, 6 Dec 2023 08:06:56 +0100 Subject: [PATCH] include disabled services for shell completion Signed-off-by: Nicolas De Loof --- cmd/compose/completion.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/compose/completion.go b/cmd/compose/completion.go index 5423cd644..83b233f1e 100644 --- a/cmd/compose/completion.go +++ b/cmd/compose/completion.go @@ -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) }