Browse code

Merge pull request #26683 from yuexiao-wang/update-inspect

Modify short and flags for docker inspect

Sebastiaan van Stijn authored on 2016/11/01 05:39:59
Showing 3 changed files
... ...
@@ -25,9 +25,12 @@ func NewInspectCommand(dockerCli *command.DockerCli) *cobra.Command {
25 25
 	var opts inspectOptions
26 26
 
27 27
 	cmd := &cobra.Command{
28
-		Use:   "inspect [OPTIONS] CONTAINER|IMAGE|TASK [CONTAINER|IMAGE|TASK...]",
29
-		Short: "Return low-level information on a container, image or task",
30
-		Args:  cli.RequiresMinArgs(1),
28
+		Use: "inspect [OPTIONS] NAME|ID [NAME|ID...]",
29
+		Short: strings.Join([]string{
30
+			"Return low-level information on Docker object(s) (e.g. container, image, volume,",
31
+			"\nnetwork, node, service, or task) identified by name or ID",
32
+		}, ""),
33
+		Args: cli.RequiresMinArgs(1),
31 34
 		RunE: func(cmd *cobra.Command, args []string) error {
32 35
 			opts.ids = args
33 36
 			return runInspect(dockerCli, opts)
... ...
@@ -18,14 +18,13 @@ keywords: ["inspect, container, json"]
18 18
 ```markdown
19 19
 Usage:  docker inspect [OPTIONS] NAME|ID [NAME|ID...]
20 20
 
21
-Return low-level information on one or multiple containers, images, volumes,
22
-networks, nodes, services, or tasks identified by name or ID.
21
+Return low-level information on Docker object(s) (e.g. container, image, volume,
22
+network, node, service, or task) identified by name or ID
23 23
 
24 24
 Options:
25 25
   -f, --format       Format the output using the given Go template
26 26
       --help         Print usage
27 27
   -s, --size         Display total file sizes if the type is container
28
-                     values are "image" or "container" or "task
29 28
       --type         Return JSON for specified type
30 29
 ```
31 30
 
... ...
@@ -14,8 +14,8 @@ NAME|ID [NAME|ID...]
14 14
 
15 15
 # DESCRIPTION
16 16
 
17
-This displays all the information available in Docker for one or multiple given
18
-containers, images, volumes, networks, nodes, services, or tasks. By default,
17
+This displays the low-level information on Docker object(s) (e.g. container, 
18
+image, volume,network, node, service, or task) identified by name or ID. By default,
19 19
 this will render all results in a JSON array. If the container and image have
20 20
 the same name, this will return container JSON for unspecified type. If a format
21 21
 is specified, the given template will be executed for each result.
... ...
@@ -25,14 +25,14 @@ is specified, the given template will be executed for each result.
25 25
     Print usage statement
26 26
 
27 27
 **-f**, **--format**=""
28
-    Format the output using the given Go template.
28
+    Format the output using the given Go template
29 29
 
30 30
 **-s**, **--size**
31
-    Display total file sizes if the type is container.
31
+    Display total file sizes if the type is container
32 32
 
33 33
 **--type**=*container*|*image*|*network*|*node*|*service*|*task*|*volume*
34 34
     Return JSON for specified type, permissible values are "image", "container",
35
-    "network", "node", "service", "task", and "volume".
35
+    "network", "node", "service", "task", and "volume"
36 36
 
37 37
 # EXAMPLES
38 38