Skip to content

Commit 7672399

Browse files
committed
Enable completion for docker images
Signed-off-by: Dorin Geman <[email protected]>
1 parent e286562 commit 7672399

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cli/command/image/list.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88

99
"github.com/docker/cli/cli"
1010
"github.com/docker/cli/cli/command"
11+
"github.com/docker/cli/cli/command/completion"
1112
"github.com/docker/cli/cli/command/formatter"
1213
flagsHelper "github.com/docker/cli/cli/flags"
1314
"github.com/docker/cli/opts"
@@ -50,6 +51,7 @@ func NewImagesCommand(dockerCLI command.Cli) *cobra.Command {
5051
"category-top": "7",
5152
"aliases": "docker image ls, docker image list, docker images",
5253
},
54+
ValidArgsFunction: completion.ImageNames(dockerCLI, 1),
5355
}
5456

5557
flags := cmd.Flags()

0 commit comments

Comments
 (0)