Skip to content

Commit 0fdbc75

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

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"
@@ -52,6 +53,7 @@ func newImagesCommand(dockerCLI command.Cli) *cobra.Command {
5253
"aliases": "docker image ls, docker image list, docker images",
5354
},
5455
DisableFlagsInUseLine: true,
56+
ValidArgsFunction: completion.ImageNames(dockerCLI, 1),
5557
}
5658

5759
flags := cmd.Flags()

0 commit comments

Comments
 (0)