Skip to content

Commit 06ed23d

Browse files
authored
Merge pull request #6419 from thaJeztah/complete_pull
add completion for docker image pull
2 parents 5bce5e1 + 5bf3c67 commit 06ed23d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cli/command/image/pull.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ func newPullCommand(dockerCLI command.Cli) *cobra.Command {
3838
"category-top": "5",
3939
"aliases": "docker image pull, docker pull",
4040
},
41-
ValidArgsFunction: cobra.NoFileCompletions,
41+
// Complete with local images to help pulling the latest version
42+
// of images that are in the image cache.
43+
ValidArgsFunction: completion.ImageNames(dockerCLI, 1),
4244
DisableFlagsInUseLine: true,
4345
}
4446

0 commit comments

Comments
 (0)