package completion
import "github.com/docker/cli/cli/command/completion"
Index ¶
- func NoComplete(_ *cobra.Command, _ []string, _ string) ([]string, cobra.ShellCompDirective)
- type APIClientProvider
- type ValidArgsFn
Functions ¶
func NoComplete ¶
NoComplete is used for commands where there's no relevant completion
Types ¶
type APIClientProvider ¶
APIClientProvider provides a method to get an client.APIClient, initializing it if needed.
It's a smaller interface than [command.Cli], and used in situations where an APIClient is needed, but we want to postpone initializing the client until it's used.
type ValidArgsFn ¶
type ValidArgsFn func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)
ValidArgsFn a function to be used by cobra command as `ValidArgsFunction` to offer command line completion
func ContainerNames ¶
func ContainerNames(dockerCLI APIClientProvider, all bool, filters ...func(types.Container) bool) ValidArgsFn
ContainerNames offers completion for container names and IDs By default, only names are returned. Set DOCKER_COMPLETION_SHOW_CONTAINER_IDS=yes to also complete IDs.
func ImageNames ¶
func ImageNames(dockerCLI APIClientProvider) ValidArgsFn
ImageNames offers completion for images present within the local store
func NetworkNames ¶
func NetworkNames(dockerCLI APIClientProvider) ValidArgsFn
NetworkNames offers completion for networks
func VolumeNames ¶
func VolumeNames(dockerCLI APIClientProvider) ValidArgsFn
VolumeNames offers completion for volumes
Source Files ¶
- Version
- v27.0.3+incompatible
- Published
- Jun 28, 2024
- Platform
- js/wasm
- Imports
- 9 packages
- Last checked
- 3 hours ago –
Tools for package owners.