DockerCLI/cli/command/image/testdata
Sebastiaan van Stijn 809eb8cdee
images: print hint when invoking "docker images" with ambiguous argument
The `docker images` top-level subcommand predates the `docker <object> <verb>`
convention (e.g. `docker image ls`), but accepts a positional argument to
search/filter images by name (globbing). It's common for users to accidentally
mistake these commands, and to use (e.g.) `docker images ls`, expecting
to see all images, but ending up with an empty list because no image named
"ls" was found.

Disallowing these search-terms would be a breaking change, but we can print
and informational message to help the users correct their mistake.

Before this patch:

    docker images ls
    REPOSITORY   TAG       IMAGE ID   CREATED   SIZE

With this patch applied:

    docker images ls
    REPOSITORY   TAG       IMAGE ID   CREATED   SIZE

    No images found matching "ls": did you mean "docker image ls"?

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-02-03 18:10:55 +01:00
..
Dockerfile.test add test case for DetectArchiveReader 2019-03-21 15:38:31 -07:00
gittar.test add test case for DetectArchiveReader 2019-03-21 15:38:31 -07:00
history-command-success.non-human.golden un-skip history test and fix golden mismatches 2022-10-24 11:11:42 -04:00
history-command-success.quiet-no-trunc.golden Unit tests for cli/commands/image (except build and tag) 2017-05-03 18:40:22 -07:00
history-command-success.quiet.golden Unit tests for cli/commands/image (except build and tag) 2017-05-03 18:40:22 -07:00
history-command-success.simple.golden force TestNewHistoryCommandSuccess to use UTC timezone 2023-08-28 10:43:21 +02:00
import-command-success.input.txt Unit tests for cli/commands/image (except build and tag) 2017-05-03 18:40:22 -07:00
inspect-command-success.format.golden Unit tests for cli/commands/image (except build and tag) 2017-05-03 18:40:22 -07:00
inspect-command-success.simple-many.golden vendor: github.com/docker/docker v24.0.0-rc.1 2023-04-28 17:56:17 +02:00
inspect-command-success.simple.golden vendor: github.com/docker/docker v24.0.0-rc.1 2023-04-28 17:56:17 +02:00
list-command-ambiguous.golden images: print hint when invoking "docker images" with ambiguous argument 2024-02-03 18:10:55 +01:00
list-command-success.filters.golden formatter: reduce minimum width for columns in table-view 2020-08-31 16:31:15 +02:00
list-command-success.format.golden Unit tests for cli/commands/image (except build and tag) 2017-05-03 18:40:22 -07:00
list-command-success.match-name.golden formatter: reduce minimum width for columns in table-view 2020-08-31 16:31:15 +02:00
list-command-success.quiet-format.golden Unit tests for cli/commands/image (except build and tag) 2017-05-03 18:40:22 -07:00
list-command-success.simple.golden formatter: reduce minimum width for columns in table-view 2020-08-31 16:31:15 +02:00
load-command-success.input-file.golden Unit tests for cli/commands/image (except build and tag) 2017-05-03 18:40:22 -07:00
load-command-success.input.txt Unit tests for cli/commands/image (except build and tag) 2017-05-03 18:40:22 -07:00
load-command-success.json.golden Unit tests for cli/commands/image (except build and tag) 2017-05-03 18:40:22 -07:00
load-command-success.simple.golden Unit tests for cli/commands/image (except build and tag) 2017-05-03 18:40:22 -07:00
prune-command-success.all.golden Unit tests for cli/commands/image (except build and tag) 2017-05-03 18:40:22 -07:00
prune-command-success.force-deleted.golden Unit tests for cli/commands/image (except build and tag) 2017-05-03 18:40:22 -07:00
prune-command-success.force-untagged.golden Unit tests for cli/commands/image (except build and tag) 2017-05-03 18:40:22 -07:00
prune-command-success.label-filter.golden Fix panic when pruning images with label-filter 2018-12-07 17:56:31 +01:00
pull-command-success.simple-no-tag.golden Add option to pull images quietly 2018-12-19 13:48:41 +01:00
pull-command-success.simple-quiet.golden fix(pull_test): for quiet option 2019-08-27 18:23:24 +09:00
pull-command-success.simple.golden Add option to pull images quietly 2018-12-19 13:48:41 +01:00
remove-command-success.Image Deleted and Untagged.golden Fix remove_test output duplication 2017-06-13 14:02:56 +02:00
remove-command-success.Image Deleted.golden Fix remove_test output duplication 2017-06-13 14:02:56 +02:00
remove-command-success.Image Untagged.golden Fix remove_test output duplication 2017-06-13 14:02:56 +02:00
remove-command-success.Image not found with force option.golden Use t.Run() for tests 2017-10-30 13:00:03 -04:00
tar.test add test case for DetectArchiveReader 2019-03-21 15:38:31 -07:00