Browse code

update command description in CLI

Signed-off-by: allencloud <allen.sun@daocloud.io>

allencloud authored on 2016/07/30 02:41:52
Showing 22 changed files
... ...
@@ -23,7 +23,7 @@ func NewKillCommand(dockerCli *client.DockerCli) *cobra.Command {
23 23
 
24 24
 	cmd := &cobra.Command{
25 25
 		Use:   "kill [OPTIONS] CONTAINER [CONTAINER...]",
26
-		Short: "Kill one or more running container",
26
+		Short: "Kill one or more running containers",
27 27
 		Args:  cli.RequiresMinArgs(1),
28 28
 		RunE: func(cmd *cobra.Command, args []string) error {
29 29
 			opts.containers = args
... ...
@@ -42,7 +42,7 @@ func NewPsCommand(dockerCli *client.DockerCli) *cobra.Command {
42 42
 	cmd := &cobra.Command{
43 43
 		Use:   "ps [OPTIONS]",
44 44
 		Short: "List containers",
45
-		Args:  cli.ExactArgs(0),
45
+		Args:  cli.NoArgs,
46 46
 		RunE: func(cmd *cobra.Command, args []string) error {
47 47
 			return runPs(dockerCli, &opts)
48 48
 		},
... ...
@@ -12,9 +12,9 @@ import (
12 12
 
13 13
 func newRemoveCommand(dockerCli *client.DockerCli) *cobra.Command {
14 14
 	return &cobra.Command{
15
-		Use:     "rm NETWORK [NETWORK]...",
15
+		Use:     "rm NETWORK [NETWORK...]",
16 16
 		Aliases: []string{"remove"},
17
-		Short:   "Remove a network",
17
+		Short:   "Remove one or more networks",
18 18
 		Args:    cli.RequiresMinArgs(1),
19 19
 		RunE: func(cmd *cobra.Command, args []string) error {
20 20
 			return runRemove(dockerCli, args)
... ...
@@ -12,7 +12,7 @@ import (
12 12
 func newDemoteCommand(dockerCli *client.DockerCli) *cobra.Command {
13 13
 	return &cobra.Command{
14 14
 		Use:   "demote NODE [NODE...]",
15
-		Short: "Demote a node from manager in the swarm",
15
+		Short: "Demote one or more nodes from manager in the swarm",
16 16
 		Args:  cli.RequiresMinArgs(1),
17 17
 		RunE: func(cmd *cobra.Command, args []string) error {
18 18
 			return runDemote(dockerCli, args)
... ...
@@ -12,7 +12,7 @@ import (
12 12
 func newPromoteCommand(dockerCli *client.DockerCli) *cobra.Command {
13 13
 	return &cobra.Command{
14 14
 		Use:   "promote NODE [NODE...]",
15
-		Short: "Promote a node to a manager in the swarm",
15
+		Short: "Promote one or more nodes to manager in the swarm",
16 16
 		Args:  cli.RequiresMinArgs(1),
17 17
 		RunE: func(cmd *cobra.Command, args []string) error {
18 18
 			return runPromote(dockerCli, args)
... ...
@@ -14,7 +14,7 @@ func newRemoveCommand(dockerCli *client.DockerCli) *cobra.Command {
14 14
 	return &cobra.Command{
15 15
 		Use:     "rm NODE [NODE...]",
16 16
 		Aliases: []string{"remove"},
17
-		Short:   "Remove a node from the swarm",
17
+		Short:   "Remove one or more nodes from the swarm",
18 18
 		Args:    cli.RequiresMinArgs(1),
19 19
 		RunE: func(cmd *cobra.Command, args []string) error {
20 20
 			return runRemove(dockerCli, args)
... ...
@@ -27,7 +27,7 @@ func newInstallCommand(dockerCli *client.DockerCli) *cobra.Command {
27 27
 	cmd := &cobra.Command{
28 28
 		Use:   "install [OPTIONS] PLUGIN",
29 29
 		Short: "Install a plugin",
30
-		Args:  cli.RequiresMinArgs(1), // TODO: allow for set args
30
+		Args:  cli.ExactArgs(1), // TODO: allow for set args
31 31
 		RunE: func(cmd *cobra.Command, args []string) error {
32 32
 			options.name = args[0]
33 33
 			return runInstall(dockerCli, options)
... ...
@@ -17,7 +17,7 @@ func newListCommand(dockerCli *client.DockerCli) *cobra.Command {
17 17
 		Use:     "ls",
18 18
 		Short:   "List plugins",
19 19
 		Aliases: []string{"list"},
20
-		Args:    cli.ExactArgs(0),
20
+		Args:    cli.NoArgs,
21 21
 		RunE: func(cmd *cobra.Command, args []string) error {
22 22
 			return runList(dockerCli)
23 23
 		},
... ...
@@ -17,7 +17,7 @@ func newRemoveCommand(dockerCli *client.DockerCli) *cobra.Command {
17 17
 		Use:     "rm PLUGIN",
18 18
 		Short:   "Remove a plugin",
19 19
 		Aliases: []string{"remove"},
20
-		Args:    cli.RequiresMinArgs(1),
20
+		Args:    cli.ExactArgs(1),
21 21
 		RunE: func(cmd *cobra.Command, args []string) error {
22 22
 			return runRemove(dockerCli, args)
23 23
 		},
... ...
@@ -15,7 +15,7 @@ func newRemoveCommand(dockerCli *client.DockerCli) *cobra.Command {
15 15
 	cmd := &cobra.Command{
16 16
 		Use:     "rm [OPTIONS] SERVICE [SERVICE...]",
17 17
 		Aliases: []string{"remove"},
18
-		Short:   "Remove a service",
18
+		Short:   "Remove one or more services",
19 19
 		Args:    cli.RequiresMinArgs(1),
20 20
 		RunE: func(cmd *cobra.Command, args []string) error {
21 21
 			return runRemove(dockerCli, args)
... ...
@@ -21,7 +21,7 @@ func NewInfoCommand(dockerCli *client.DockerCli) *cobra.Command {
21 21
 	cmd := &cobra.Command{
22 22
 		Use:   "info",
23 23
 		Short: "Display system-wide information",
24
-		Args:  cli.ExactArgs(0),
24
+		Args:  cli.NoArgs,
25 25
 		RunE: func(cmd *cobra.Command, args []string) error {
26 26
 			return runInfo(dockerCli)
27 27
 		},
... ...
@@ -44,7 +44,7 @@ func NewVersionCommand(dockerCli *client.DockerCli) *cobra.Command {
44 44
 	cmd := &cobra.Command{
45 45
 		Use:   "version [OPTIONS]",
46 46
 		Short: "Show the Docker version information",
47
-		Args:  cli.ExactArgs(0),
47
+		Args:  cli.NoArgs,
48 48
 		RunE: func(cmd *cobra.Command, args []string) error {
49 49
 			return runVersion(dockerCli, &opts)
50 50
 		},
... ...
@@ -12,9 +12,9 @@ import (
12 12
 
13 13
 func newRemoveCommand(dockerCli *client.DockerCli) *cobra.Command {
14 14
 	return &cobra.Command{
15
-		Use:     "rm VOLUME [VOLUME]...",
15
+		Use:     "rm VOLUME [VOLUME...]",
16 16
 		Aliases: []string{"remove"},
17
-		Short:   "Remove a volume",
17
+		Short:   "Remove one or more volumes",
18 18
 		Long:    removeDescription,
19 19
 		Example: removeExample,
20 20
 		Args:    cli.RequiresMinArgs(1),
... ...
@@ -45,7 +45,7 @@ func runRemove(dockerCli *client.DockerCli, volumes []string) error {
45 45
 }
46 46
 
47 47
 var removeDescription = `
48
-Removes one or more volumes. You cannot remove a volume that is in use by a container.
48
+Remove one or more volumes. You cannot remove a volume that is in use by a container.
49 49
 `
50 50
 
51 51
 var removeExample = `
... ...
@@ -786,7 +786,7 @@ __docker_node_commands() {
786 786
         "inspect:Display detailed information on one or more nodes"
787 787
         "ls:List nodes in the swarm"
788 788
         "promote:Promote a node as manager in the swarm"
789
-        "rm:Remove a node from the swarm"
789
+        "rm:Remove one or more nodes from the swarm"
790 790
         "ps:List tasks running on a node"
791 791
         "update:Update a node"
792 792
     )
... ...
@@ -1058,7 +1058,7 @@ __docker_service_commands() {
1058 1058
         "create:Create a new service"
1059 1059
         "inspect:Display detailed information on one or more services"
1060 1060
         "ls:List services"
1061
-        "rm:Remove a service"
1061
+        "rm:Remove one or more services"
1062 1062
         "scale:Scale one or multiple services"
1063 1063
         "ps:List the tasks of a service"
1064 1064
         "update:Update a service"
... ...
@@ -1314,7 +1314,7 @@ __docker_volume_commands() {
1314 1314
         "create:Create a volume"
1315 1315
         "inspect:Display detailed information on one or more volumes"
1316 1316
         "ls:List volumes"
1317
-        "rm:Remove a volume"
1317
+        "rm:Remove one or more volumes"
1318 1318
     )
1319 1319
     _describe -t docker-volume-commands "docker volume command" _docker_volume_subcommands
1320 1320
 }
... ...
@@ -117,7 +117,7 @@ read the [`dockerd`](dockerd.md) reference page.
117 117
 | [node update](node_update.md) | Update attributes for a node                 |
118 118
 | [node ps](node_ps.md) | List tasks running on a node                   |
119 119
 | [node ls](node_ls.md) | List nodes in the swarm                              |
120
-| [node rm](node_rm.md) | Remove a node from the swarm                         |
120
+| [node rm](node_rm.md) | Remove one or more nodes from the swarm                         |
121 121
 
122 122
 ### Swarm swarm commands
123 123
 
... ...
@@ -13,7 +13,7 @@ parent = "smn_cli"
13 13
 ```markdown
14 14
 Usage:  docker kill [OPTIONS] CONTAINER [CONTAINER...]
15 15
 
16
-Kill one or more running container
16
+Kill one or more running containers
17 17
 
18 18
 Options:
19 19
       --help            Print usage
... ...
@@ -11,9 +11,9 @@ parent = "smn_cli"
11 11
 # network rm
12 12
 
13 13
 ```markdown
14
-Usage:  docker network rm NETWORK [NETWORK]...
14
+Usage:  docker network rm NETWORK [NETWORK...]
15 15
 
16
-Remove a network
16
+Remove one or more networks
17 17
 
18 18
 Aliases:
19 19
   rm, remove
... ...
@@ -13,7 +13,7 @@ parent = "smn_cli"
13 13
 ```markdown
14 14
 Usage:  docker node demote NODE [NODE...]
15 15
 
16
-Demote a node from manager in the swarm
16
+Demote one or more nodes from manager in the swarm
17 17
 
18 18
 Options:
19 19
       --help   Print usage
... ...
@@ -13,7 +13,7 @@ parent = "smn_cli"
13 13
 ```markdown
14 14
 Usage:  docker node promote NODE [NODE...]
15 15
 
16
-Promote a node to a manager in the swarm
16
+Promote one or more nodes to manager in the swarm
17 17
 
18 18
 Options:
19 19
       --help   Print usage
... ...
@@ -13,7 +13,7 @@ parent = "smn_cli"
13 13
 ```markdown
14 14
 Usage:  docker node rm NODE [NODE...]
15 15
 
16
-Remove a node from the swarm
16
+Remove one or more nodes from the swarm
17 17
 
18 18
 Aliases:
19 19
   rm, remove
... ...
@@ -11,9 +11,9 @@ parent = "smn_cli"
11 11
 # service rm
12 12
 
13 13
 ```Markdown
14
-Usage:	docker service rm [OPTIONS] SERVICE
14
+Usage:	docker service rm [OPTIONS] SERVICE [SERVICE...]
15 15
 
16
-Remove a service
16
+Remove one or more services
17 17
 
18 18
 Aliases:
19 19
   rm, remove
... ...
@@ -11,9 +11,9 @@ parent = "smn_cli"
11 11
 # volume rm
12 12
 
13 13
 ```markdown
14
-Usage:  docker volume rm VOLUME [VOLUME]...
14
+Usage:  docker volume rm VOLUME [VOLUME...]
15 15
 
16
-Remove a volume
16
+Remove one or more volumes
17 17
 
18 18
 Aliases:
19 19
   rm, remove
... ...
@@ -22,7 +22,7 @@ Options:
22 22
       --help   Print usage
23 23
 ```
24 24
 
25
-Removes one or more volumes. You cannot remove a volume that is in use by a container.
25
+Remove one or more volumes. You cannot remove a volume that is in use by a container.
26 26
 
27 27
     $ docker volume rm hello
28 28
     hello