DockerCLI/e2e/stack
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
..
testdata cli: print full command as aliases in usage output 2022-06-28 11:03:30 +02:00
config_test.go Add stack config command 2022-04-08 14:56:01 +02:00
deploy_test.go remove obsolete mutli-orchestrator support 2022-02-22 15:28:12 +01:00
help_test.go remove obsolete mutli-orchestrator support 2022-02-22 15:28:12 +01:00
main_test.go Move common e2e things into an internal package. 2017-09-06 17:07:38 -04:00
remove_test.go remove obsolete mutli-orchestrator support 2022-02-22 15:28:12 +01:00