completion

package
v0.33.16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 11, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

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. The suggestion list itself is never truncated: what the registry holds is what the shell is offered.

Index

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL