Browse code

Modify short and flags for docker inspect

Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>

yuexiao-wang authored on 2016/09/18 14:11:02
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)
... ...
@@ -13,14 +13,13 @@ parent = "smn_cli"
13 13
 ```markdown
14 14
 Usage:  docker inspect [OPTIONS] NAME|ID [NAME|ID...]
15 15
 
16
-Return low-level information on one or multiple containers, images, volumes,
17
-networks, nodes, services, or tasks identified by name or ID.
16
+Return low-level information on Docker object(s) (e.g. container, image, volume,
17
+network, node, service, or task) identified by name or ID
18 18
 
19 19
 Options:
20 20
   -f, --format       Format the output using the given go template
21 21
       --help         Print usage
22 22
   -s, --size         Display total file sizes if the type is container
23
-                     values are "image" or "container" or "task
24 23
       --type         Return JSON for specified type
25 24
 ```
26 25
 
... ...
@@ -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