cmdx

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 27, 2026 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddGlobalFlag

func AddGlobalFlag(c *cobra.Command, usage string)

func CompleteCatalogNamesFromConfig

func CompleteCatalogNamesFromConfig(_ *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

CompleteCatalogNamesFromConfig is the App-less variant used by commands that load config directly (the package-var commands in cmd/catalog/).

func Scope

func Scope(c *cobra.Command) manifest.Scope

func WithApp

func WithApp(a *app.App, fn func(a *app.App, cmd *cobra.Command, args []string) error) func(*cobra.Command, []string) error

Types

type CompletionFunc

type CompletionFunc func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

func CompleteActiveEnvKeys

func CompleteActiveEnvKeys(a *app.App) CompletionFunc

CompleteActiveEnvKeys completes keys present in the active env.

func CompleteActivePackages

func CompleteActivePackages(a *app.App) CompletionFunc

CompleteActivePackages completes names of packages currently recorded in the active nem.ver (project + global merged).

func CompleteCatalogNames

func CompleteCatalogNames(a *app.App) CompletionFunc

CompleteCatalogNames completes catalog names from the App's cached Config, skipping any already present in args.

func CompleteCatalogPackages

func CompleteCatalogPackages(a *app.App) CompletionFunc

CompleteCatalogPackages completes package names known to any configured catalog. Bounded by completionTimeout so a wedged catalog can't hang the shell.

func CompleteInstalledRefs

func CompleteInstalledRefs(a *app.App) CompletionFunc

CompleteInstalledRefs completes name@version refs for every installed package — for uninstall and reinstall.

Jump to

Keyboard shortcuts

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