Skip to content

Commit 3cadbd8

Browse files
authored
Merge pull request #6420 from thaJeztah/28.x_backport_complete_pull
[28.x backport] add completion for docker image pull
2 parents b89b069 + b3df920 commit 3cadbd8

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
@@ -46,7 +46,9 @@ func newPullCommand(dockerCLI command.Cli) *cobra.Command {
4646
"category-top": "5",
4747
"aliases": "docker image pull, docker pull",
4848
},
49-
ValidArgsFunction: cobra.NoFileCompletions,
49+
// Complete with local images to help pulling the latest version
50+
// of images that are in the image cache.
51+
ValidArgsFunction: completion.ImageNames(dockerCLI, 1),
5052
}
5153

5254
flags := cmd.Flags()

0 commit comments

Comments
 (0)