completion

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package completion provides shell completion candidates for commands that take license keys, download IDs, cache entries or Docker contexts.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CachedLicenseKeys

func CachedLicenseKeys(_ *cobra.Command, _ []string, _ string) ([]cobra.Completion, cobra.ShellCompDirective)

CachedLicenseKeys lists the licenses with cached downloads, which is the only set the cache commands can operate on. It reads local metadata, so it needs no network.

func DockerContexts

func DockerContexts(cmd *cobra.Command, _ []string, toComplete string) ([]cobra.Completion, cobra.ShellCompDirective)

DockerContexts lists the contexts xf can enable, derived from the embedded compose files. Values already passed to the repeatable flag are omitted.

func DownloadIDs

func DownloadIDs(cmd *cobra.Command, _ []string, _ string) ([]cobra.Completion, cobra.ShellCompDirective)

DownloadIDs lists the packages a license can download. It reads the --license flag, so the two flags complete in sequence.

func LicenseKeys

func LicenseKeys(cmd *cobra.Command, _ []string, _ string) ([]cobra.Completion, cobra.ShellCompDirective)

LicenseKeys lists the keys of the customer's licenses. It falls back to the licenses with cached downloads when the API is unavailable, which are usually the ones in play.

func Register

func Register(cmd *cobra.Command, flag string, fn cobra.CompletionFunc)

Register wires a completion function for a flag the command has defined.

Types

This section is empty.

Jump to

Keyboard shortcuts

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