mirror of https://github.com/docker/compose.git
services shell completion bugfix
Signed-off-by: Andrew Onyshchuk <andryk.rv@gmail.com>
This commit is contained in:
parent
b2d4c1b865
commit
f46ca459d2
|
@ -41,13 +41,14 @@ func completeServiceNames(dockerCli command.Cli, p *ProjectOptions) validArgsFn
|
|||
if err != nil {
|
||||
return nil, cobra.ShellCompDirectiveNoFileComp
|
||||
}
|
||||
var values []string
|
||||
serviceNames := append(project.ServiceNames(), project.DisabledServiceNames()...)
|
||||
for _, s := range serviceNames {
|
||||
if toComplete == "" || strings.HasPrefix(s, toComplete) {
|
||||
serviceNames = append(serviceNames, s)
|
||||
values = append(values, s)
|
||||
}
|
||||
}
|
||||
return serviceNames, cobra.ShellCompDirectiveNoFileComp
|
||||
return values, cobra.ShellCompDirectiveNoFileComp
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue