Browse code

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 <github@albersweb.de>

Harald Albers authored on 2015/09/09 01:02:16
Showing 5 changed files
... ...
@@ -102,7 +102,7 @@ func (cli *DockerCli) CmdVolumeLs(args ...string) error {
102 102
 //
103 103
 // Usage: docker volume inspect [OPTIONS] VOLUME [VOLUME...]
104 104
 func (cli *DockerCli) CmdVolumeInspect(args ...string) error {
105
-	cmd := Cli.Subcmd("volume inspect", []string{"[VOLUME NAME]"}, "Return low-level information on a volume", true)
105
+	cmd := Cli.Subcmd("volume inspect", []string{"VOLUME [VOLUME...]"}, "Return low-level information on a volume", true)
106 106
 	tmplStr := cmd.String([]string{"f", "-format"}, "", "Format the output using the given go template.")
107 107
 	if err := cmd.Parse(args); err != nil {
108 108
 		return nil
... ...
@@ -210,7 +210,7 @@ func (cli *DockerCli) CmdVolumeCreate(args ...string) error {
210 210
 //
211 211
 // Usage: docker volume rm VOLUME [VOLUME...]
212 212
 func (cli *DockerCli) CmdVolumeRm(args ...string) error {
213
-	cmd := Cli.Subcmd("volume rm", []string{"[NAME]"}, "Remove a volume", true)
213
+	cmd := Cli.Subcmd("volume rm", []string{"VOLUME [VOLUME...]"}, "Remove a volume", true)
214 214
 	cmd.Require(flag.Min, 1)
215 215
 	cmd.ParseFlags(args, true)
216 216
 
... ...
@@ -10,9 +10,9 @@ parent = "smn_cli"
10 10
 
11 11
 # volume inspect
12 12
 
13
-    Usage: docker volume inspect [OPTIONS] [VOLUME NAME]
13
+    Usage: docker volume inspect [OPTIONS] VOLUME [VOLUME...]
14 14
 
15
-    Inspect a volume
15
+    Inspect one or more volumes
16 16
 
17 17
     -f, --format=       Format the output using the given go template.
18 18
 
... ...
@@ -10,13 +10,13 @@ parent = "smn_cli"
10 10
 
11 11
 # volume rm
12 12
 
13
-    Usage: docker volume rm [OPTIONS] [VOLUME NAME]
13
+    Usage: docker volume rm [OPTIONS] VOLUME [VOLUME...]
14 14
 
15 15
     Remove a volume
16 16
 
17 17
     --help=false       Print usage
18 18
 
19
-Removes a volume. You cannot remove a volume that is in use by a container.
19
+Removes one or more volumes. You cannot remove a volume that is in use by a container.
20 20
 
21 21
   $ docker volume rm hello
22 22
   hello
... ...
@@ -8,11 +8,11 @@ docker-volume-inspect - Get low-level information about a volume
8 8
 **docker volume inspect**
9 9
 [**-f**|**--format**[=**]]
10 10
 
11
-[OPTIONS] [VOLUME NAME]
11
+[OPTIONS] VOLUME [VOLUME...]
12 12
 
13 13
 # DESCRIPTION
14 14
 
15
-Returns information about a volume. By default, this command renders all results
15
+Returns information about one or more volumes. By default, this command renders all results
16 16
 in a JSON array. You can specify an alternate format to execute a given template
17 17
 is executed for each result. Go's
18 18
 http://golang.org/pkg/text/template/ package describes all the details of the
... ...
@@ -7,11 +7,11 @@ docker-volume-rm - Remove a volume
7 7
 # SYNOPSIS
8 8
 **docker volume rm**
9 9
 
10
-[OPTIONS] [VOLUME NAME]
10
+[OPTIONS] VOLUME [VOLUME...]
11 11
 
12 12
 # DESCRIPTION
13 13
 
14
-Removes a volume. You cannot remove a volume that is in use by a container.
14
+Removes one or more volumes. You cannot remove a volume that is in use by a container.
15 15
 
16 16
     ```
17 17
     $ docker volume rm hello