DockerCLI/e2e
Sebastiaan van Stijn c60b360c33
cli: improve argument validation output
Improve the output for these validation errors:

- Removes the short command description from the output. This information
  does not provide much useful help, and distracts from the error message.
- Reduces punctuation, and
- Prefixes the error message with the binary / root-command name
  (usually `docker:`) to be consistent with other similar errors.
- Adds an empty line between the error-message and the "call to action"
  (`Run 'docker volume --help'...` in the example below). This helps
  separating the error message and "usage" from the call-to-action.

Before this patch:

    $ docker volume ls one two three
    "docker volume ls" accepts no arguments.
    See 'docker volume ls --help'.

    Usage:  docker volume ls [OPTIONS]

    List volumes

    $ docker volume create one two three
    "docker volume create" requires at most 1 argument.
    See 'docker volume create --help'.

    Usage:  docker volume create [OPTIONS] [VOLUME]

    Create a volume

With this patch:

    $ docker volume ls one two three
    docker: 'docker volume ls' accepts no arguments

    Usage:  docker volume ls [OPTIONS]

    Run 'docker volume ls --help' for more information

    $ docker voludocker volume create one two three
    docker: 'docker volume create' requires at most 1 argument

    Usage:  docker volume create [OPTIONS] [VOLUME]

    SRun 'docker volume create --help' for more information

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-05 03:35:14 +02:00
..
cli-plugins cli: improve argument validation output 2024-07-05 03:35:14 +02:00
container Add e2e tests for run w/ bad entrypoint 2024-05-07 11:22:18 +01:00
context cli/config: add EnvOverrideConfigDir const 2023-06-28 13:20:29 +02:00
global feat: standardize error for prompt 2024-03-26 14:11:55 +01:00
image linting: fmt.Sprintf can be replaced with string concatenation (perfsprint) 2024-06-10 21:19:32 +02:00
internal/fixtures update golangci-lint to v1.54.2 2023-08-29 14:21:47 +02:00
plugin linting: fmt.Sprintf can be replaced with string concatenation (perfsprint) 2024-06-10 21:19:32 +02:00
stack Add support for --detach flag in stack deploy 2024-03-04 09:36:36 +01:00
system bump gotest.tools v3.0.1 for compatibility with Go 1.14 2020-02-23 00:28:55 +01:00
testdata update to go1.21.12 2024-07-03 10:59:37 +02:00
testutils feat: standardize error for prompt 2024-03-26 14:11:55 +01:00
trust linting: fmt.Sprintf can be replaced with string concatenation (perfsprint) 2024-06-10 21:19:32 +02:00
compose-env.connhelper-ssh.yaml Cleanup of dockerfiles, compose files and env vars 2024-02-13 13:32:45 +00:00
compose-env.experimental.yaml e2e: update to use compose v2, and don't depend on distro-packages 2023-09-26 12:20:01 +02:00
compose-env.yaml Updated engine versions in e2e text matrix 2024-05-16 11:04:30 +00:00