mirror of
https://github.com/docker/cli.git
synced 2026-01-06 05:41:44 +03:00
remove redundant closures around completion functions
These were remnants from some earlier implementation. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -32,9 +32,7 @@ func newConfigInspectCommand(dockerCLI command.Cli) *cobra.Command {
|
||||
opts.names = args
|
||||
return runInspect(cmd.Context(), dockerCLI, opts)
|
||||
},
|
||||
ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
|
||||
return completeNames(dockerCLI)(cmd, args, toComplete)
|
||||
},
|
||||
ValidArgsFunction: completeNames(dockerCLI),
|
||||
DisableFlagsInUseLine: true,
|
||||
}
|
||||
|
||||
|
||||
@@ -19,9 +19,7 @@ func newConfigRemoveCommand(dockerCLI command.Cli) *cobra.Command {
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
return runRemove(cmd.Context(), dockerCLI, args)
|
||||
},
|
||||
ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
|
||||
return completeNames(dockerCLI)(cmd, args, toComplete)
|
||||
},
|
||||
ValidArgsFunction: completeNames(dockerCLI),
|
||||
DisableFlagsInUseLine: true,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,9 +31,7 @@ func newSecretInspectCommand(dockerCLI command.Cli) *cobra.Command {
|
||||
opts.names = args
|
||||
return runSecretInspect(cmd.Context(), dockerCLI, opts)
|
||||
},
|
||||
ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
|
||||
return completeNames(dockerCLI)(cmd, args, toComplete)
|
||||
},
|
||||
ValidArgsFunction: completeNames(dockerCLI),
|
||||
DisableFlagsInUseLine: true,
|
||||
}
|
||||
|
||||
|
||||
@@ -31,9 +31,7 @@ func newSecretListCommand(dockerCLI command.Cli) *cobra.Command {
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
return runSecretList(cmd.Context(), dockerCLI, options)
|
||||
},
|
||||
ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
|
||||
return completeNames(dockerCLI)(cmd, args, toComplete)
|
||||
},
|
||||
ValidArgsFunction: completeNames(dockerCLI),
|
||||
DisableFlagsInUseLine: true,
|
||||
}
|
||||
|
||||
|
||||
@@ -26,9 +26,7 @@ func newSecretRemoveCommand(dockerCLI command.Cli) *cobra.Command {
|
||||
}
|
||||
return runRemove(cmd.Context(), dockerCLI, opts)
|
||||
},
|
||||
ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
|
||||
return completeNames(dockerCLI)(cmd, args, toComplete)
|
||||
},
|
||||
ValidArgsFunction: completeNames(dockerCLI),
|
||||
DisableFlagsInUseLine: true,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,9 +45,7 @@ func newDeployCommand(dockerCLI command.Cli) *cobra.Command {
|
||||
}
|
||||
return runDeploy(cmd.Context(), dockerCLI, cmd.Flags(), &opts, config)
|
||||
},
|
||||
ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
|
||||
return completeNames(dockerCLI)(cmd, args, toComplete)
|
||||
},
|
||||
ValidArgsFunction: completeNames(dockerCLI),
|
||||
DisableFlagsInUseLine: true,
|
||||
}
|
||||
|
||||
|
||||
@@ -38,9 +38,7 @@ func newPsCommand(dockerCLI command.Cli) *cobra.Command {
|
||||
}
|
||||
return runPS(cmd.Context(), dockerCLI, opts)
|
||||
},
|
||||
ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
|
||||
return completeNames(dockerCLI)(cmd, args, toComplete)
|
||||
},
|
||||
ValidArgsFunction: completeNames(dockerCLI),
|
||||
DisableFlagsInUseLine: true,
|
||||
}
|
||||
flags := cmd.Flags()
|
||||
|
||||
@@ -36,9 +36,7 @@ func newRemoveCommand(dockerCLI command.Cli) *cobra.Command {
|
||||
}
|
||||
return runRemove(cmd.Context(), dockerCLI, opts)
|
||||
},
|
||||
ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
|
||||
return completeNames(dockerCLI)(cmd, args, toComplete)
|
||||
},
|
||||
ValidArgsFunction: completeNames(dockerCLI),
|
||||
DisableFlagsInUseLine: true,
|
||||
}
|
||||
|
||||
|
||||
@@ -38,9 +38,7 @@ func newServicesCommand(dockerCLI command.Cli) *cobra.Command {
|
||||
}
|
||||
return runServices(cmd.Context(), dockerCLI, opts)
|
||||
},
|
||||
ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
|
||||
return completeNames(dockerCLI)(cmd, args, toComplete)
|
||||
},
|
||||
ValidArgsFunction: completeNames(dockerCLI),
|
||||
DisableFlagsInUseLine: true,
|
||||
}
|
||||
flags := cmd.Flags()
|
||||
|
||||
Reference in New Issue
Block a user