From ccbaaf0722ceb2293bb33623f26d64500a367049 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Tue, 15 Mar 2022 15:06:35 +0100 Subject: [PATCH] search: remove client-side default for --limit The daemon (and registry) already have a default limit. This patch removes the default from the client side, to not duplicate setting these defaults. Signed-off-by: Sebastiaan van Stijn --- cli/command/registry/search.go | 3 +-- docs/reference/commandline/search.md | 6 +++--- man/src/search.md | 2 -- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/cli/command/registry/search.go b/cli/command/registry/search.go index c106c7a2cb..cabaad28ae 100644 --- a/cli/command/registry/search.go +++ b/cli/command/registry/search.go @@ -38,8 +38,7 @@ func NewSearchCommand(dockerCli command.Cli) *cobra.Command { flags.BoolVar(&options.noTrunc, "no-trunc", false, "Don't truncate output") flags.VarP(&options.filter, "filter", "f", "Filter output based on conditions provided") - // TODO(thaJeztah) remove default from client as the daemon already has a default - flags.IntVar(&options.limit, "limit", 25, "Max number of search results") + flags.IntVar(&options.limit, "limit", 0, "Max number of search results") flags.StringVar(&options.format, "format", "", "Pretty-print search using a Go template") return cmd diff --git a/docs/reference/commandline/search.md b/docs/reference/commandline/search.md index 9c056a3e09..d47a8257e8 100644 --- a/docs/reference/commandline/search.md +++ b/docs/reference/commandline/search.md @@ -18,7 +18,7 @@ Options: - stars= - image has at least 'number' stars --format string Pretty-print images using a Go template --help Print usage - --limit int Max number of search results (default 25) + --limit int Max number of search results --no-trunc Don't truncate output ``` @@ -79,8 +79,8 @@ radial/busyboxplus Full-chain, Internet enabled, busybox made from scratch. Co ### Limit search results (--limit) -The flag `--limit` is the maximum number of results returned by a search. This value could -be in the range between 1 and 100. The default value of `--limit` is 25. +The flag `--limit` is the maximum number of results returned by a search. If no +value is set, the default is set by the daemon. ### Filtering diff --git a/man/src/search.md b/man/src/search.md index cf2ac4f1a9..6caf4ad2ea 100644 --- a/man/src/search.md +++ b/man/src/search.md @@ -2,8 +2,6 @@ Search Docker Hub for images that match the specified `TERM`. The table of images returned displays the name, description (truncated by default), number of stars awarded, whether the image is official, and whether it is automated. -*Note* - Search queries will only return up to 25 results - ## Filter Filter output based on these conditions: