From ceb11d966034f4b4308abf4fc2826b4c840b6e99 Mon Sep 17 00:00:00 2001 From: Harald Albers Date: Mon, 10 Aug 2015 07:07:50 -0700 Subject: [PATCH] Remove -h flag from completion and daemon reference All docker subcommands support `-h` as an alias for `--help` unless they have `-h` aliased to something else like `docker run`, which uses `-h` for `--hostname`. `-h` is not included in the help messages of the commands, though. It ist visible in * reference: only in `docker daemon` reference, see output of `grep -Rse --help=false docs` * man pages: only in `docker` man page see output of `grep -RF '**-h**' man` For consistency reasons, this commit removes `-h` as an alias for `--help` from the reference page, man page and the bash completion. Signed-off-by: Harald Albers --- contrib/completion/bash/docker | 4 ++-- docker/docker.go | 2 +- docs/reference/commandline/cli.md | 2 +- docs/reference/commandline/daemon.md | 2 +- man/docker.1.md | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/contrib/completion/bash/docker b/contrib/completion/bash/docker index 28123ae731ece..faff614fb93dd 100644 --- a/contrib/completion/bash/docker +++ b/contrib/completion/bash/docker @@ -320,7 +320,7 @@ __docker_signals() { _docker_docker() { local boolean_options=" $global_boolean_options - --help -h + --help --version -v " @@ -460,7 +460,7 @@ _docker_create() { _docker_daemon() { local boolean_options=" $global_boolean_options - --help -h + --help --icc=false --ip-forward=false --ip-masq=false diff --git a/docker/docker.go b/docker/docker.go index 236742debf36e..8ad0d13c05c1a 100644 --- a/docker/docker.go +++ b/docker/docker.go @@ -27,7 +27,7 @@ func main() { flag.Merge(flag.CommandLine, clientFlags.FlagSet, commonFlags.FlagSet) flag.Usage = func() { - fmt.Fprint(os.Stdout, "Usage: docker [OPTIONS] COMMAND [arg...]\n"+daemonUsage+" docker [ -h | --help | -v | --version ]\n\n") + fmt.Fprint(os.Stdout, "Usage: docker [OPTIONS] COMMAND [arg...]\n"+daemonUsage+" docker [ --help | -v | --version ]\n\n") fmt.Fprint(os.Stdout, "A self-sufficient runtime for containers.\n\nOptions:\n") flag.CommandLine.SetOutput(os.Stdout) diff --git a/docs/reference/commandline/cli.md b/docs/reference/commandline/cli.md index 2766bb4dac270..a07fc8b3339ae 100644 --- a/docs/reference/commandline/cli.md +++ b/docs/reference/commandline/cli.md @@ -16,7 +16,7 @@ or execute `docker help`: $ docker Usage: docker [OPTIONS] COMMAND [arg...] docker daemon [ --help | ... ] - docker [ -h | --help | -v | --version ] + docker [ --help | -v | --version ] -H, --host=[]: The socket(s) to bind to in daemon mode, specified using one or more tcp://host:port, unix:///path/to/socket, fd://* or fd://socketfd. diff --git a/docs/reference/commandline/daemon.md b/docs/reference/commandline/daemon.md index 2f2010941e2f9..cea4cc68d6ead 100644 --- a/docs/reference/commandline/daemon.md +++ b/docs/reference/commandline/daemon.md @@ -32,7 +32,7 @@ parent = "smn_cli" -G, --group="docker" Group for the unix socket -g, --graph="/var/lib/docker" Root of the Docker runtime -H, --host=[] Daemon socket(s) to connect to - -h, --help=false Print usage + --help=false Print usage --icc=true Enable inter-container communication --insecure-registry=[] Enable insecure registry communication --ip=0.0.0.0 Default IP when binding container ports diff --git a/man/docker.1.md b/man/docker.1.md index 898ff08a56a04..40b7bd65ee0e5 100644 --- a/man/docker.1.md +++ b/man/docker.1.md @@ -23,7 +23,7 @@ its own man page which explain usage and arguments. To see the man page for a command run **man docker **. # OPTIONS -**-h**, **--help** +**--help** Print usage statement **--api-cors-header**=""