Browse code

Remove shorthand flags for "mount", "pretty", and "no-resolve"

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 7bf0faf42377a91a8535b443201d9ad62326889b)
Signed-off-by: Tibor Vass <tibor@docker.com>

Sebastiaan van Stijn authored on 2016/07/14 01:46:17
Showing 14 changed files
... ...
@@ -37,7 +37,7 @@ func newInspectCommand(dockerCli *client.DockerCli) *cobra.Command {
37 37
 
38 38
 	flags := cmd.Flags()
39 39
 	flags.StringVarP(&opts.format, "format", "f", "", "Format the output using the given go template")
40
-	flags.BoolVarP(&opts.pretty, "pretty", "p", false, "Print the information in a human friendly format.")
40
+	flags.BoolVar(&opts.pretty, "pretty", false, "Print the information in a human friendly format.")
41 41
 	return cmd
42 42
 }
43 43
 
... ...
@@ -34,7 +34,7 @@ func newTasksCommand(dockerCli *client.DockerCli) *cobra.Command {
34 34
 	}
35 35
 	flags := cmd.Flags()
36 36
 	flags.BoolVarP(&opts.all, "all", "a", false, "Display all instances")
37
-	flags.BoolVarP(&opts.noResolve, "no-resolve", "n", false, "Do not map IDs to Names")
37
+	flags.BoolVar(&opts.noResolve, "no-resolve", false, "Do not map IDs to Names")
38 38
 	flags.VarP(&opts.filter, "filter", "f", "Filter output based on conditions provided")
39 39
 
40 40
 	return cmd
... ...
@@ -42,7 +42,7 @@ func newInspectCommand(dockerCli *client.DockerCli) *cobra.Command {
42 42
 
43 43
 	flags := cmd.Flags()
44 44
 	flags.StringVarP(&opts.format, "format", "f", "", "Format the output using the given go template")
45
-	flags.BoolVarP(&opts.pretty, "pretty", "p", false, "Print the information in a human friendly format.")
45
+	flags.BoolVar(&opts.pretty, "pretty", false, "Print the information in a human friendly format.")
46 46
 	return cmd
47 47
 }
48 48
 
... ...
@@ -464,7 +464,7 @@ func addServiceFlags(cmd *cobra.Command, opts *serviceOptions) {
464 464
 	flags.VarP(&opts.env, "env", "e", "Set environment variables")
465 465
 	flags.StringVarP(&opts.workdir, "workdir", "w", "", "Working directory inside the container")
466 466
 	flags.StringVarP(&opts.user, flagUser, "u", "", "Username or UID")
467
-	flags.VarP(&opts.mounts, flagMount, "m", "Attach a mount to the service")
467
+	flags.Var(&opts.mounts, flagMount, "Attach a mount to the service")
468 468
 
469 469
 	flags.Var(&opts.resources.limitCPU, flagLimitCPU, "Limit CPUs")
470 470
 	flags.Var(&opts.resources.limitMemBytes, flagLimitMemory, "Limit Memory")
... ...
@@ -35,7 +35,7 @@ func newTasksCommand(dockerCli *client.DockerCli) *cobra.Command {
35 35
 	}
36 36
 	flags := cmd.Flags()
37 37
 	flags.BoolVarP(&opts.all, "all", "a", false, "Display all tasks")
38
-	flags.BoolVarP(&opts.noResolve, "no-resolve", "n", false, "Do not map IDs to Names")
38
+	flags.BoolVar(&opts.noResolve, "no-resolve", false, "Do not map IDs to Names")
39 39
 	flags.VarP(&opts.filter, "filter", "f", "Filter output based on conditions provided")
40 40
 
41 41
 	return cmd
... ...
@@ -38,7 +38,7 @@ func newTasksCommand(dockerCli *client.DockerCli) *cobra.Command {
38 38
 	}
39 39
 	flags := cmd.Flags()
40 40
 	flags.BoolVarP(&opts.all, "all", "a", false, "Display all tasks")
41
-	flags.BoolVarP(&opts.noResolve, "no-resolve", "n", false, "Do not map IDs to Names")
41
+	flags.BoolVar(&opts.noResolve, "no-resolve", false, "Do not map IDs to Names")
42 42
 	flags.VarP(&opts.filter, "filter", "f", "Filter output based on conditions provided")
43 43
 
44 44
 	return cmd
... ...
@@ -1600,7 +1600,7 @@ _docker_service_inspect() {
1600 1600
 
1601 1601
 	case "$cur" in
1602 1602
 		-*)
1603
-			COMPREPLY=( $( compgen -W "--format -f --help --pretty -p" -- "$cur" ) )
1603
+			COMPREPLY=( $( compgen -W "--format -f --help --pretty" -- "$cur" ) )
1604 1604
 			;;
1605 1605
 		*)
1606 1606
 			__docker_complete_services
... ...
@@ -1689,7 +1689,7 @@ _docker_service_tasks() {
1689 1689
 
1690 1690
 	case "$cur" in
1691 1691
 		-*)
1692
-			COMPREPLY=( $( compgen -W "--all -a --filter -f --help --no-resolve -n" -- "$cur" ) )
1692
+			COMPREPLY=( $( compgen -W "--all -a --filter -f --help --no-resolve" -- "$cur" ) )
1693 1693
 			;;
1694 1694
 		*)
1695 1695
 			local counter=$(__docker_pos_first_nonflag '--filter|-f')
... ...
@@ -1710,7 +1710,7 @@ _docker_service_update() {
1710 1710
 		--label -l
1711 1711
 		--limit-cpu
1712 1712
 		--limit-memory
1713
-		--mount -m
1713
+		--mount
1714 1714
 		--name
1715 1715
 		--network
1716 1716
 		--publish -p
... ...
@@ -1956,7 +1956,7 @@ _docker_node_inspect() {
1956 1956
 
1957 1957
 	case "$cur" in
1958 1958
 		-*)
1959
-			COMPREPLY=( $( compgen -W "--format -f --help --pretty -p" -- "$cur" ) )
1959
+			COMPREPLY=( $( compgen -W "--format -f --help --pretty" -- "$cur" ) )
1960 1960
 			;;
1961 1961
 		*)
1962 1962
 			__docker_complete_nodes
... ...
@@ -2042,7 +2042,7 @@ _docker_node_tasks() {
2042 2042
 
2043 2043
 	case "$cur" in
2044 2044
 		-*)
2045
-			COMPREPLY=( $( compgen -W "--all -a --filter -f --help --no-resolve -n" -- "$cur" ) )
2045
+			COMPREPLY=( $( compgen -W "--all -a --filter -f --help --no-resolve" -- "$cur" ) )
2046 2046
 			;;
2047 2047
 		*)
2048 2048
 			local counter=$(__docker_pos_first_nonflag '--filter|-f')
... ...
@@ -809,7 +809,7 @@ __docker_node_subcommand() {
809 809
             _arguments $(__docker_arguments) \
810 810
                 $opts_help \
811 811
                 "($help -f --format)"{-f=,--format=}"[Format the output using the given go template]:template: " \
812
-                "($help -p --pretty)"{-p,--pretty}"[Print the information in a human friendly format]" \
812
+                "($help --pretty)--pretty[Print the information in a human friendly format]" \
813 813
                 "($help -)*:node:__docker_complete_nodes" && ret=0
814 814
             ;;
815 815
         (ls|list)
... ...
@@ -833,7 +833,7 @@ __docker_node_subcommand() {
833 833
                 $opts_help \
834 834
                 "($help -a --all)"{-a,--all}"[Display all instances]" \
835 835
                 "($help)*"{-f=,--filter=}"[Provide filter values]:filter:->filter-options" \
836
-                "($help -n --no-resolve)"{-n,--no-resolve}"[Do not map IDs to Names]" \
836
+                "($help --no-resolve)--no-resolve[Do not map IDs to Names]" \
837 837
                 "($help -)1:node:__docker_complete_nodes" && ret=0
838 838
             case $state in
839 839
                 (filter-options)
... ...
@@ -1073,7 +1073,7 @@ __docker_service_subcommand() {
1073 1073
         "($help)--limit-cpu=[Limit CPUs]:value: "
1074 1074
         "($help)--limit-memory=[Limit Memory]:value: "
1075 1075
         "($help)--mode=[Limit Memory]:mode:(global replicated)"
1076
-        "($help)*"{-m=,--mount=}"[Attach a mount to the service]:mount: "
1076
+        "($help)*--mount=[Attach a mount to the service]:mount: "
1077 1077
         "($help)--name=[Service name]:name: "
1078 1078
         "($help)*--network=[Network attachments]:network: "
1079 1079
         "($help)*"{-p=,--publish=}"[Publish a port as a node port]:port: "
... ...
@@ -1104,7 +1104,7 @@ __docker_service_subcommand() {
1104 1104
             _arguments $(__docker_arguments) \
1105 1105
                 $opts_help \
1106 1106
                 "($help -f --format)"{-f=,--format=}"[Format the output using the given go template]:template: " \
1107
-                "($help -p --pretty)"{-p,--pretty}"[Print the information in a human friendly format]" \
1107
+                "($help --pretty)--pretty[Print the information in a human friendly format]" \
1108 1108
                 "($help -)*:service:__docker_complete_services" && ret=0
1109 1109
             ;;
1110 1110
         (ls|list)
... ...
@@ -1142,7 +1142,7 @@ __docker_service_subcommand() {
1142 1142
                 $opts_help \
1143 1143
                 "($help -a --all)"{-a,--all}"[Display all tasks]" \
1144 1144
                 "($help)*"{-f=,--filter=}"[Provide filter values]:filter:->filter-options" \
1145
-                "($help -n --no-resolve)"{-n,--no-resolve}"[Do not map IDs to Names]" \
1145
+                "($help --no-resolve)--no-resolve[Do not map IDs to Names]" \
1146 1146
                 "($help -)1:service:__docker_complete_services" && ret=0
1147 1147
             case $state in
1148 1148
                 (filter-options)
... ...
@@ -20,7 +20,7 @@ Display detailed information on one or more nodes
20 20
 Options:
21 21
   -f, --format string   Format the output using the given go template
22 22
       --help            Print usage
23
-  -p, --pretty          Print the information in a human friendly format.
23
+      --pretty          Print the information in a human friendly format.
24 24
 ```
25 25
 
26 26
 Returns information about a node. By default, this command renders all results
... ...
@@ -21,7 +21,7 @@ Options:
21 21
   -a, --all            Display all instances
22 22
   -f, --filter value   Filter output based on conditions provided
23 23
       --help           Print usage
24
-  -n, --no-resolve     Do not map IDs to Names
24
+      --no-resolve     Do not map IDs to Names
25 25
 ```
26 26
 
27 27
 Lists all the tasks on a Node that Docker knows about. You can filter using the `-f` or `--filter` flag. Refer to the [filtering](#filtering) section for more information about available filter options.
... ...
@@ -27,7 +27,7 @@ Options:
27 27
       --limit-cpu value              Limit CPUs (default 0.000)
28 28
       --limit-memory value           Limit Memory (default 0 B)
29 29
       --mode string                  Service mode (replicated or global) (default "replicated")
30
-  -m, --mount value                  Attach a mount to the service
30
+      --mount value                  Attach a mount to the service
31 31
       --name string                  Service name
32 32
       --network value                Network attachments (default [])
33 33
   -p, --publish value                Publish a port as a node port (default [])
... ...
@@ -20,7 +20,7 @@ Display detailed information on one or more services
20 20
 Options:
21 21
   -f, --format string   Format the output using the given go template
22 22
       --help            Print usage
23
-  -p, --pretty          Print the information in a human friendly format.
23
+      --pretty          Print the information in a human friendly format.
24 24
 ```
25 25
 
26 26
 
... ...
@@ -21,7 +21,7 @@ Options:
21 21
   -a, --all            Display all tasks
22 22
   -f, --filter value   Filter output based on conditions provided
23 23
       --help           Print usage
24
-  -n, --no-resolve     Do not map IDs to Names
24
+      --no-resolve     Do not map IDs to Names
25 25
 ```
26 26
 
27 27
 Lists the tasks that are running as part of the specified service. This command
... ...
@@ -27,7 +27,7 @@ Options:
27 27
   -l, --label value                  Service labels (default [])
28 28
       --limit-cpu value              Limit CPUs (default 0.000)
29 29
       --limit-memory value           Limit Memory (default 0 B)
30
-  -m, --mount value                  Attach a mount to the service
30
+      --mount value                  Attach a mount to the service
31 31
       --name string                  Service name
32 32
       --network value                Network attachments (default [])
33 33
   -p, --publish value                Publish a port as a node port (default [])