Merge pull request #24591 from thaJeztah/remove-shorthand-flagz

Remove shorthand flags for "mount", "pretty", and "no-resolve"
This commit is contained in:
Tibor Vass 2016-07-13 12:51:53 -07:00 committed by GitHub
commit 1f74917f60
14 changed files with 22 additions and 22 deletions

View File

@ -37,7 +37,7 @@ func newInspectCommand(dockerCli *client.DockerCli) *cobra.Command {
flags := cmd.Flags() flags := cmd.Flags()
flags.StringVarP(&opts.format, "format", "f", "", "Format the output using the given go template") flags.StringVarP(&opts.format, "format", "f", "", "Format the output using the given go template")
flags.BoolVarP(&opts.pretty, "pretty", "p", false, "Print the information in a human friendly format.") flags.BoolVar(&opts.pretty, "pretty", false, "Print the information in a human friendly format.")
return cmd return cmd
} }

View File

@ -34,7 +34,7 @@ func newTasksCommand(dockerCli *client.DockerCli) *cobra.Command {
} }
flags := cmd.Flags() flags := cmd.Flags()
flags.BoolVarP(&opts.all, "all", "a", false, "Display all instances") flags.BoolVarP(&opts.all, "all", "a", false, "Display all instances")
flags.BoolVarP(&opts.noResolve, "no-resolve", "n", false, "Do not map IDs to Names") flags.BoolVar(&opts.noResolve, "no-resolve", false, "Do not map IDs to Names")
flags.VarP(&opts.filter, "filter", "f", "Filter output based on conditions provided") flags.VarP(&opts.filter, "filter", "f", "Filter output based on conditions provided")
return cmd return cmd

View File

@ -42,7 +42,7 @@ func newInspectCommand(dockerCli *client.DockerCli) *cobra.Command {
flags := cmd.Flags() flags := cmd.Flags()
flags.StringVarP(&opts.format, "format", "f", "", "Format the output using the given go template") flags.StringVarP(&opts.format, "format", "f", "", "Format the output using the given go template")
flags.BoolVarP(&opts.pretty, "pretty", "p", false, "Print the information in a human friendly format.") flags.BoolVar(&opts.pretty, "pretty", false, "Print the information in a human friendly format.")
return cmd return cmd
} }

View File

@ -464,7 +464,7 @@ func addServiceFlags(cmd *cobra.Command, opts *serviceOptions) {
flags.VarP(&opts.env, "env", "e", "Set environment variables") flags.VarP(&opts.env, "env", "e", "Set environment variables")
flags.StringVarP(&opts.workdir, "workdir", "w", "", "Working directory inside the container") flags.StringVarP(&opts.workdir, "workdir", "w", "", "Working directory inside the container")
flags.StringVarP(&opts.user, flagUser, "u", "", "Username or UID") flags.StringVarP(&opts.user, flagUser, "u", "", "Username or UID")
flags.VarP(&opts.mounts, flagMount, "m", "Attach a mount to the service") flags.Var(&opts.mounts, flagMount, "Attach a mount to the service")
flags.Var(&opts.resources.limitCPU, flagLimitCPU, "Limit CPUs") flags.Var(&opts.resources.limitCPU, flagLimitCPU, "Limit CPUs")
flags.Var(&opts.resources.limitMemBytes, flagLimitMemory, "Limit Memory") flags.Var(&opts.resources.limitMemBytes, flagLimitMemory, "Limit Memory")

View File

@ -35,7 +35,7 @@ func newTasksCommand(dockerCli *client.DockerCli) *cobra.Command {
} }
flags := cmd.Flags() flags := cmd.Flags()
flags.BoolVarP(&opts.all, "all", "a", false, "Display all tasks") flags.BoolVarP(&opts.all, "all", "a", false, "Display all tasks")
flags.BoolVarP(&opts.noResolve, "no-resolve", "n", false, "Do not map IDs to Names") flags.BoolVar(&opts.noResolve, "no-resolve", false, "Do not map IDs to Names")
flags.VarP(&opts.filter, "filter", "f", "Filter output based on conditions provided") flags.VarP(&opts.filter, "filter", "f", "Filter output based on conditions provided")
return cmd return cmd

View File

@ -38,7 +38,7 @@ func newTasksCommand(dockerCli *client.DockerCli) *cobra.Command {
} }
flags := cmd.Flags() flags := cmd.Flags()
flags.BoolVarP(&opts.all, "all", "a", false, "Display all tasks") flags.BoolVarP(&opts.all, "all", "a", false, "Display all tasks")
flags.BoolVarP(&opts.noResolve, "no-resolve", "n", false, "Do not map IDs to Names") flags.BoolVar(&opts.noResolve, "no-resolve", false, "Do not map IDs to Names")
flags.VarP(&opts.filter, "filter", "f", "Filter output based on conditions provided") flags.VarP(&opts.filter, "filter", "f", "Filter output based on conditions provided")
return cmd return cmd

View File

@ -1600,7 +1600,7 @@ _docker_service_inspect() {
case "$cur" in case "$cur" in
-*) -*)
COMPREPLY=( $( compgen -W "--format -f --help --pretty -p" -- "$cur" ) ) COMPREPLY=( $( compgen -W "--format -f --help --pretty" -- "$cur" ) )
;; ;;
*) *)
__docker_complete_services __docker_complete_services
@ -1689,7 +1689,7 @@ _docker_service_tasks() {
case "$cur" in case "$cur" in
-*) -*)
COMPREPLY=( $( compgen -W "--all -a --filter -f --help --no-resolve -n" -- "$cur" ) ) COMPREPLY=( $( compgen -W "--all -a --filter -f --help --no-resolve" -- "$cur" ) )
;; ;;
*) *)
local counter=$(__docker_pos_first_nonflag '--filter|-f') local counter=$(__docker_pos_first_nonflag '--filter|-f')
@ -1710,7 +1710,7 @@ _docker_service_update() {
--label -l --label -l
--limit-cpu --limit-cpu
--limit-memory --limit-memory
--mount -m --mount
--name --name
--network --network
--publish -p --publish -p
@ -1956,7 +1956,7 @@ _docker_node_inspect() {
case "$cur" in case "$cur" in
-*) -*)
COMPREPLY=( $( compgen -W "--format -f --help --pretty -p" -- "$cur" ) ) COMPREPLY=( $( compgen -W "--format -f --help --pretty" -- "$cur" ) )
;; ;;
*) *)
__docker_complete_nodes __docker_complete_nodes
@ -2042,7 +2042,7 @@ _docker_node_tasks() {
case "$cur" in case "$cur" in
-*) -*)
COMPREPLY=( $( compgen -W "--all -a --filter -f --help --no-resolve -n" -- "$cur" ) ) COMPREPLY=( $( compgen -W "--all -a --filter -f --help --no-resolve" -- "$cur" ) )
;; ;;
*) *)
local counter=$(__docker_pos_first_nonflag '--filter|-f') local counter=$(__docker_pos_first_nonflag '--filter|-f')

View File

@ -808,7 +808,7 @@ __docker_node_subcommand() {
_arguments $(__docker_arguments) \ _arguments $(__docker_arguments) \
$opts_help \ $opts_help \
"($help -f --format)"{-f=,--format=}"[Format the output using the given go template]:template: " \ "($help -f --format)"{-f=,--format=}"[Format the output using the given go template]:template: " \
"($help -p --pretty)"{-p,--pretty}"[Print the information in a human friendly format]" \ "($help --pretty)--pretty[Print the information in a human friendly format]" \
"($help -)*:node:__docker_complete_nodes" && ret=0 "($help -)*:node:__docker_complete_nodes" && ret=0
;; ;;
(ls|list) (ls|list)
@ -832,7 +832,7 @@ __docker_node_subcommand() {
$opts_help \ $opts_help \
"($help -a --all)"{-a,--all}"[Display all instances]" \ "($help -a --all)"{-a,--all}"[Display all instances]" \
"($help)*"{-f=,--filter=}"[Provide filter values]:filter:->filter-options" \ "($help)*"{-f=,--filter=}"[Provide filter values]:filter:->filter-options" \
"($help -n --no-resolve)"{-n,--no-resolve}"[Do not map IDs to Names]" \ "($help --no-resolve)--no-resolve[Do not map IDs to Names]" \
"($help -)1:node:__docker_complete_nodes" && ret=0 "($help -)1:node:__docker_complete_nodes" && ret=0
case $state in case $state in
(filter-options) (filter-options)
@ -1072,7 +1072,7 @@ __docker_service_subcommand() {
"($help)--limit-cpu=[Limit CPUs]:value: " "($help)--limit-cpu=[Limit CPUs]:value: "
"($help)--limit-memory=[Limit Memory]:value: " "($help)--limit-memory=[Limit Memory]:value: "
"($help)--mode=[Limit Memory]:mode:(global replicated)" "($help)--mode=[Limit Memory]:mode:(global replicated)"
"($help)*"{-m=,--mount=}"[Attach a mount to the service]:mount: " "($help)*--mount=[Attach a mount to the service]:mount: "
"($help)--name=[Service name]:name: " "($help)--name=[Service name]:name: "
"($help)*--network=[Network attachments]:network: " "($help)*--network=[Network attachments]:network: "
"($help)*"{-p=,--publish=}"[Publish a port as a node port]:port: " "($help)*"{-p=,--publish=}"[Publish a port as a node port]:port: "
@ -1103,7 +1103,7 @@ __docker_service_subcommand() {
_arguments $(__docker_arguments) \ _arguments $(__docker_arguments) \
$opts_help \ $opts_help \
"($help -f --format)"{-f=,--format=}"[Format the output using the given go template]:template: " \ "($help -f --format)"{-f=,--format=}"[Format the output using the given go template]:template: " \
"($help -p --pretty)"{-p,--pretty}"[Print the information in a human friendly format]" \ "($help --pretty)--pretty[Print the information in a human friendly format]" \
"($help -)*:service:__docker_complete_services" && ret=0 "($help -)*:service:__docker_complete_services" && ret=0
;; ;;
(ls|list) (ls|list)
@ -1141,7 +1141,7 @@ __docker_service_subcommand() {
$opts_help \ $opts_help \
"($help -a --all)"{-a,--all}"[Display all tasks]" \ "($help -a --all)"{-a,--all}"[Display all tasks]" \
"($help)*"{-f=,--filter=}"[Provide filter values]:filter:->filter-options" \ "($help)*"{-f=,--filter=}"[Provide filter values]:filter:->filter-options" \
"($help -n --no-resolve)"{-n,--no-resolve}"[Do not map IDs to Names]" \ "($help --no-resolve)--no-resolve[Do not map IDs to Names]" \
"($help -)1:service:__docker_complete_services" && ret=0 "($help -)1:service:__docker_complete_services" && ret=0
case $state in case $state in
(filter-options) (filter-options)

View File

@ -19,7 +19,7 @@ Display detailed information on one or more nodes
Options: Options:
-f, --format string Format the output using the given go template -f, --format string Format the output using the given go template
--help Print usage --help Print usage
-p, --pretty Print the information in a human friendly format. --pretty Print the information in a human friendly format.
``` ```
Returns information about a node. By default, this command renders all results Returns information about a node. By default, this command renders all results

View File

@ -20,7 +20,7 @@ Options:
-a, --all Display all instances -a, --all Display all instances
-f, --filter value Filter output based on conditions provided -f, --filter value Filter output based on conditions provided
--help Print usage --help Print usage
-n, --no-resolve Do not map IDs to Names --no-resolve Do not map IDs to Names
``` ```
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. 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.

View File

@ -25,7 +25,7 @@ Options:
--limit-cpu value Limit CPUs (default 0.000) --limit-cpu value Limit CPUs (default 0.000)
--limit-memory value Limit Memory (default 0 B) --limit-memory value Limit Memory (default 0 B)
--mode string Service mode (replicated or global) (default "replicated") --mode string Service mode (replicated or global) (default "replicated")
-m, --mount value Attach a mount to the service --mount value Attach a mount to the service
--name string Service name --name string Service name
--network value Network attachments (default []) --network value Network attachments (default [])
-p, --publish value Publish a port as a node port (default []) -p, --publish value Publish a port as a node port (default [])

View File

@ -19,7 +19,7 @@ Display detailed information on one or more services
Options: Options:
-f, --format string Format the output using the given go template -f, --format string Format the output using the given go template
--help Print usage --help Print usage
-p, --pretty Print the information in a human friendly format. --pretty Print the information in a human friendly format.
``` ```

View File

@ -20,7 +20,7 @@ Options:
-a, --all Display all tasks -a, --all Display all tasks
-f, --filter value Filter output based on conditions provided -f, --filter value Filter output based on conditions provided
--help Print usage --help Print usage
-n, --no-resolve Do not map IDs to Names --no-resolve Do not map IDs to Names
``` ```
Lists the tasks that are running as part of the specified service. This command Lists the tasks that are running as part of the specified service. This command

View File

@ -26,7 +26,7 @@ Options:
-l, --label value Service labels (default []) -l, --label value Service labels (default [])
--limit-cpu value Limit CPUs (default 0.000) --limit-cpu value Limit CPUs (default 0.000)
--limit-memory value Limit Memory (default 0 B) --limit-memory value Limit Memory (default 0 B)
-m, --mount value Attach a mount to the service --mount value Attach a mount to the service
--name string Service name --name string Service name
--network value Network attachments (default []) --network value Network attachments (default [])
-p, --publish value Publish a port as a node port (default []) -p, --publish value Publish a port as a node port (default [])