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:
@ -34,7 +34,7 @@ func newInspectCommand(dockerCli command.Cli) *cobra.Command {
|
||||
opts.refs = args
|
||||
return runInspect(cmd.Context(), dockerCli, opts)
|
||||
},
|
||||
ValidArgsFunction: completion.ImageNames(dockerCli),
|
||||
ValidArgsFunction: completion.ImageNames(dockerCli, -1),
|
||||
}
|
||||
|
||||
flags := cmd.Flags()
|
||||
|
||||
Reference in New Issue
Block a user