From 00eaa7e1f53d9100e95af80d8a05f8e77e380464 Mon Sep 17 00:00:00 2001 From: Harald Albers Date: Tue, 8 Sep 2015 09:02:16 -0700 Subject: [PATCH] Fix usage for `docker volume inspect` and `docker volume rm` For both commands, volume is _not_ optional. Several volumes may be specified. Both commands now use the same name (VOLUME) for the command argument. Signed-off-by: Harald Albers --- api/client/volume.go | 4 ++-- docs/reference/commandline/volume_inspect.md | 4 ++-- docs/reference/commandline/volume_rm.md | 4 ++-- man/docker-volume-inspect.1.md | 4 ++-- man/docker-volume-rm.1.md | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/api/client/volume.go b/api/client/volume.go index ccb01888d4..e29060e449 100644 --- a/api/client/volume.go +++ b/api/client/volume.go @@ -102,7 +102,7 @@ func (cli *DockerCli) CmdVolumeLs(args ...string) error { // // Usage: docker volume inspect [OPTIONS] VOLUME [VOLUME...] func (cli *DockerCli) CmdVolumeInspect(args ...string) error { - cmd := Cli.Subcmd("volume inspect", []string{"[VOLUME NAME]"}, "Return low-level information on a volume", true) + cmd := Cli.Subcmd("volume inspect", []string{"VOLUME [VOLUME...]"}, "Return low-level information on a volume", true) tmplStr := cmd.String([]string{"f", "-format"}, "", "Format the output using the given go template.") if err := cmd.Parse(args); err != nil { return nil @@ -210,7 +210,7 @@ func (cli *DockerCli) CmdVolumeCreate(args ...string) error { // // Usage: docker volume rm VOLUME [VOLUME...] func (cli *DockerCli) CmdVolumeRm(args ...string) error { - cmd := Cli.Subcmd("volume rm", []string{"[NAME]"}, "Remove a volume", true) + cmd := Cli.Subcmd("volume rm", []string{"VOLUME [VOLUME...]"}, "Remove a volume", true) cmd.Require(flag.Min, 1) cmd.ParseFlags(args, true) diff --git a/docs/reference/commandline/volume_inspect.md b/docs/reference/commandline/volume_inspect.md index f002636593..291ecb3806 100644 --- a/docs/reference/commandline/volume_inspect.md +++ b/docs/reference/commandline/volume_inspect.md @@ -10,9 +10,9 @@ parent = "smn_cli" # volume inspect - Usage: docker volume inspect [OPTIONS] [VOLUME NAME] + Usage: docker volume inspect [OPTIONS] VOLUME [VOLUME...] - Inspect a volume + Inspect one or more volumes -f, --format= Format the output using the given go template. diff --git a/docs/reference/commandline/volume_rm.md b/docs/reference/commandline/volume_rm.md index 9b83909a9b..e2f31b3cce 100644 --- a/docs/reference/commandline/volume_rm.md +++ b/docs/reference/commandline/volume_rm.md @@ -10,13 +10,13 @@ parent = "smn_cli" # volume rm - Usage: docker volume rm [OPTIONS] [VOLUME NAME] + Usage: docker volume rm [OPTIONS] VOLUME [VOLUME...] Remove a volume --help=false Print usage -Removes a volume. You cannot remove a volume that is in use by a container. +Removes one or more volumes. You cannot remove a volume that is in use by a container. $ docker volume rm hello hello diff --git a/man/docker-volume-inspect.1.md b/man/docker-volume-inspect.1.md index cc9d753bdb..afba3e6aca 100644 --- a/man/docker-volume-inspect.1.md +++ b/man/docker-volume-inspect.1.md @@ -8,11 +8,11 @@ docker-volume-inspect - Get low-level information about a volume **docker volume inspect** [**-f**|**--format**[=**]] -[OPTIONS] [VOLUME NAME] +[OPTIONS] VOLUME [VOLUME...] # DESCRIPTION -Returns information about a volume. By default, this command renders all results +Returns information about one or more volumes. By default, this command renders all results in a JSON array. You can specify an alternate format to execute a given template is executed for each result. Go's http://golang.org/pkg/text/template/ package describes all the details of the diff --git a/man/docker-volume-rm.1.md b/man/docker-volume-rm.1.md index ff7c6d3168..a1d519012f 100644 --- a/man/docker-volume-rm.1.md +++ b/man/docker-volume-rm.1.md @@ -7,11 +7,11 @@ docker-volume-rm - Remove a volume # SYNOPSIS **docker volume rm** -[OPTIONS] [VOLUME NAME] +[OPTIONS] VOLUME [VOLUME...] # DESCRIPTION -Removes a volume. You cannot remove a volume that is in use by a container. +Removes one or more volumes. You cannot remove a volume that is in use by a container. ``` $ docker volume rm hello