completion v2: some small follow-ups

- Prevent completion on "create" subcommands to prevent them
  from completing with local filenames
- Add completion for "docker image save"
- Add completion for "docker image tag"
- Disable completion for "docker login"
- Exclude "paused" containers for "docker container attach" and
  "docker container exec"

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2022-05-12 13:18:48 +02:00
parent a09e61a247
commit 66b9056500
14 changed files with 30 additions and 3 deletions

View File

@ -6,6 +6,7 @@ import (
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
"github.com/docker/cli/cli/command/completion"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
@ -27,6 +28,7 @@ func NewSaveCommand(dockerCli command.Cli) *cobra.Command {
opts.images = args
return RunSave(dockerCli, opts)
},
ValidArgsFunction: completion.ImageNames(dockerCli),
}
flags := cmd.Flags()