Restrict completion for some commands with a limit paramter for ImageNames
Previously, multiple suggestions were provided when completing commands like `run`, `history` and `push`. This change limits completion to a single suggestion for the above and 2 suggestions for `tag` Signed-off-by: Mohammed Aminu Futa <mohammedfuta2000@gmail.com>
This commit is contained in:
@ -43,7 +43,7 @@ func NewRunCommand(dockerCli command.Cli) *cobra.Command {
|
||||
}
|
||||
return runRun(cmd.Context(), dockerCli, cmd.Flags(), &options, copts)
|
||||
},
|
||||
ValidArgsFunction: completion.ImageNames(dockerCli),
|
||||
ValidArgsFunction: completion.ImageNames(dockerCli, 1),
|
||||
Annotations: map[string]string{
|
||||
"category-top": "1",
|
||||
"aliases": "docker container run, docker run",
|
||||
|
||||
Reference in New Issue
Block a user