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:
@ -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/docker/cli/cli/command/formatter/tabwriter"
|
||||
"github.com/docker/cli/cli/context/docker"
|
||||
"github.com/docker/cli/cli/context/store"
|
||||
@ -44,7 +45,8 @@ func newCreateCommand(dockerCli command.Cli) *cobra.Command {
|
||||
opts.Name = args[0]
|
||||
return RunCreate(dockerCli, opts)
|
||||
},
|
||||
Long: longCreateDescription(),
|
||||
Long: longCreateDescription(),
|
||||
ValidArgsFunction: completion.NoComplete,
|
||||
}
|
||||
flags := cmd.Flags()
|
||||
flags.StringVar(&opts.Description, "description", "", "Description of the context")
|
||||
|
||||
Reference in New Issue
Block a user