Documentation
¶
Overview ¶
Package completion provides shell-completion helpers for the `d8 cr` subtree. The command files in basic/ and fs/ wire these in via ValidArgsFunction and RegisterFlagCompletionFunc.
Completion-time network calls (ListCatalog/ListTags) are bounded by completionTimeout and degrade silently to an empty result on any failure - completion must never surface a stack trace into the user's terminal.
Index ¶
- func ImageRef() cobra.CompletionFunc
- func ImageThenInImagePath() cobra.CompletionFunc
- func ImageThenPath() cobra.CompletionFunc
- func PathThenImage() cobra.CompletionFunc
- func PullFormats() []string
- func RegistryHost() cobra.CompletionFunc
- func RepoRef() cobra.CompletionFunc
- func Static(values ...string) cobra.CompletionFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ImageRef ¶
func ImageRef() cobra.CompletionFunc
ImageRef completes IMAGE arguments (host, host/repo, host/repo:tag).
func ImageThenInImagePath ¶
func ImageThenInImagePath() cobra.CompletionFunc
ImageThenInImagePath handles `cr fs ls/cat/tree/info IMAGE PATH`-style commands. First positional is IMAGE (network completion); subsequent positionals are in-image paths which are intentionally NOT completed (would require fetching layers per TAB - too expensive). NoFileComp is returned to avoid misleading the user with local file suggestions.
func ImageThenPath ¶
func ImageThenPath() cobra.CompletionFunc
ImageThenPath handles `export IMAGE [TARBALL]`-style commands: image completion for the first positional, file completion for the rest.
func PathThenImage ¶
func PathThenImage() cobra.CompletionFunc
PathThenImage handles `push PATH IMAGE`-style commands: file completion for the first positional, image completion for the rest.
func PullFormats ¶
func PullFormats() []string
PullFormats returns the static enum used for `cr pull --format`. Forwarded from imageio so that the cobra command and completion read from the same source of truth.
func RegistryHost ¶
func RegistryHost() cobra.CompletionFunc
RegistryHost completes REGISTRY (cr catalog) from ~/.docker/config.json. No network call - just local credential config.
func RepoRef ¶
func RepoRef() cobra.CompletionFunc
RepoRef completes REPO arguments (cr ls): host, host/repo - never tags.
func Static ¶
func Static(values ...string) cobra.CompletionFunc
Static completes a flag value from a fixed enum.
Types ¶
This section is empty.