From 288326da1c9bcefe3b6d00b53b20300e2c8832ef Mon Sep 17 00:00:00 2001 From: Richard Chen Zheng <58443436+rchenzheng@users.noreply.github.com> Date: Sun, 9 Aug 2020 11:30:50 -0400 Subject: [PATCH] Fix Auto complete options available: - Add support for --gpus to run/create container in bash and zsh - Remove --group from run and update container as it's not a valid flag in zsh - Add --group-add --group-rm for create and update update service in bash Signed-off-by: Richard Chen Zheng <58443436+rchenzheng@users.noreply.github.com> --- contrib/completion/bash/docker | 1 + contrib/completion/zsh/_docker | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/contrib/completion/bash/docker b/contrib/completion/bash/docker index f86263ec78..733cdeb3b3 100644 --- a/contrib/completion/bash/docker +++ b/contrib/completion/bash/docker @@ -1894,6 +1894,7 @@ _docker_container_run_and_create() { --env -e --env-file --expose + --gpus --group-add --health-cmd --health-interval diff --git a/contrib/completion/zsh/_docker b/contrib/completion/zsh/_docker index c3caa32b1a..31c097f578 100644 --- a/contrib/completion/zsh/_docker +++ b/contrib/completion/zsh/_docker @@ -624,7 +624,8 @@ __docker_container_subcommand() { "($help)--entrypoint=[Overwrite the default entrypoint of the image]:entry point: " "($help)*--env-file=[Read environment variables from a file]:environment file:_files" "($help)*--expose=[Expose a port from the container without publishing it]: " - "($help)*--group=[Set one or more supplementary user groups for the container]:group:_groups" + "($help)*--gpus=[GPU devices to add to the container ('all' to pass all GPUs)]:device: " + "($help)*--group-add=[Set one or more supplementary user groups for the container]:group:_groups" "($help -h --hostname)"{-h=,--hostname=}"[Container host name]:hostname:_hosts" "($help -i --interactive)"{-i,--interactive}"[Keep stdin open even if not attached]" "($help)--init[Run an init inside the container that forwards signals and reaps processes]" @@ -2015,6 +2016,7 @@ __docker_service_subcommand() { "($help)*--dns-option=[Set DNS options]:DNS option: " \ "($help)*--dns-search=[Set custom DNS search domains]:DNS search: " \ "($help)*--env-file=[Read environment variables from a file]:environment file:_files" \ + "($help)*--group=[Set one or more supplementary user groups for the container]:group: _groups " \ "($help)--mode=[Service Mode]:mode:(global replicated)" \ "($help)--name=[Service name]:name: " \ "($help)*--placement-pref=[Add a placement preference]:pref:__docker_service_complete_placement_pref" \