Add completion for `--attach`

Signed-off-by: Harald Albers <github@albersweb.de>
This commit is contained in:
Harald Albers 2024-10-23 13:09:13 +00:00
parent 761d76750c
commit b598ec8cdb
1 changed files with 1 additions and 0 deletions

View File

@ -56,6 +56,7 @@ var restartPolicies = []string{
// addCompletions adds the completions that `run` and `create` have in common.
func addCompletions(cmd *cobra.Command, dockerCLI completion.APIClientProvider) {
_ = cmd.RegisterFlagCompletionFunc("attach", completion.FromList("stderr", "stdin", "stdout"))
_ = cmd.RegisterFlagCompletionFunc("cap-add", completeLinuxCapabilityNames)
_ = cmd.RegisterFlagCompletionFunc("cap-drop", completeLinuxCapabilityNames)
_ = cmd.RegisterFlagCompletionFunc("env", completion.EnvVarNames)