Remove --port and update --publish for services to support syntaxes

Add support for simple and complex syntax to `--publish` through the
use of `PortOpt`.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
Vincent Demeester 2016-12-08 22:32:10 +01:00 committed by Tibor Vass
parent fe9be95dec
commit b837f7456d
2 changed files with 6 additions and 6 deletions

View File

@ -2756,7 +2756,7 @@ _docker_service_update() {
--host
--mode
--name
--port
--publish
--secret
"
@ -2803,8 +2803,8 @@ _docker_service_update() {
--host-add
--host-rm
--image
--port-add
--port-rm
--publish-add
--publish-rm
--secret-add
--secret-rm
"

View File

@ -1797,7 +1797,7 @@ __docker_service_subcommand() {
"($help)*--env-file=[Read environment variables from a file]:environment file:_files" \
"($help)--mode=[Service Mode]:mode:(global replicated)" \
"($help)--name=[Service name]:name: " \
"($help)*--port=[Publish a port]:port: " \
"($help)*--publish=[Publish a port]:port: " \
"($help -): :__docker_complete_images" \
"($help -):command: _command_names -e" \
"($help -)*::arguments: _normal" && ret=0
@ -1870,8 +1870,8 @@ __docker_service_subcommand() {
"($help)*--group-add=[Add additional supplementary user groups to the container]:group:_groups" \
"($help)*--group-rm=[Remove previously added supplementary user groups from the container]:group:_groups" \
"($help)--image=[Service image tag]:image:__docker_complete_repositories" \
"($help)*--port-add=[Add or update a port]:port: " \
"($help)*--port-rm=[Remove a port(target-port mandatory)]:port: " \
"($help)*--publish-add=[Add or update a port]:port: " \
"($help)*--publish-rm=[Remove a port(target-port mandatory)]:port: " \
"($help)--rollback[Rollback to previous specification]" \
"($help -)1:service:__docker_complete_services" && ret=0
;;