DockerCLI/e2e
Sebastiaan van Stijn 2d88c896bc
cli: print full command as aliases in usage output
The default output for Cobra aliases only shows the subcommand as alias, which
is not very intuitive. This patch changes the output to print the full command
as it would be called by the user.

Note that there's still some improvements to be made; due to how aliases must be
set-up in Cobra, aliases at different "levels" are still not shown. So for example,
`docker ps --help` will not show `docker container ps` as alias, and vice-versa.
This will require additional changes, and can possibly be resolved using custom
metadata/annotations.

Before this patch:

    docker container ls --help

    Usage:  docker container ls [OPTIONS]

    List containers

    Aliases:
      ls, ps, list

After this patch:

    docker container ls --help

    Usage:  docker container ls [OPTIONS]

    List containers

    Aliases:
      docker container ls, docker container ps, docker container list

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-06-28 11:03:30 +02:00
..
cli-plugins Adopt Cobra completion v2 to support completion by CLI plugins 2022-05-12 12:59:10 +02:00
container bump gotest.tools v3.0.1 for compatibility with Go 1.14 2020-02-23 00:28:55 +01:00
context Adopt Cobra completion v2 to support completion by CLI plugins 2022-05-12 12:59:10 +02:00
global change TestNewAPIClientFromFlagsWithHttpProxyEnv to an e2e test 2021-07-28 22:33:12 +02:00
image e2e: remove deprecated io/ioutil and use t.TempDir() 2022-02-25 15:42:21 +01:00
internal/fixtures e2e: make sure that os.environ is preserved 2021-06-11 17:46:30 +02:00
plugin bump gotest.tools v3.0.1 for compatibility with Go 1.14 2020-02-23 00:28:55 +01:00
stack cli: print full command as aliases in usage output 2022-06-28 11:03:30 +02:00
system bump gotest.tools v3.0.1 for compatibility with Go 1.14 2020-02-23 00:28:55 +01:00
testdata Add script to regenerate test-certificate fixtures 2020-04-10 16:43:06 +02:00
trust bump gotest.tools v3.0.1 for compatibility with Go 1.14 2020-02-23 00:28:55 +01:00
compose-env.connhelper-ssh.yaml connhelper: add e2e 2018-09-30 10:24:34 +09:00
compose-env.experimental.yaml Make test-e2e run against experimental and non-experimental daemon 2018-06-25 11:46:35 +02:00
compose-env.yaml Disable TLS for e2e docker-in-docker daemon 2019-07-29 14:50:23 -07:00