Documentation
¶
Index ¶
- func AddGlobalFlag(c *cobra.Command, usage string)
- func CompleteCatalogNamesFromConfig(_ *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)
- func Scope(c *cobra.Command) manifest.Scope
- func WithApp(a *app.App, fn func(a *app.App, cmd *cobra.Command, args []string) error) func(*cobra.Command, []string) error
- type CompletionFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddGlobalFlag ¶
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/).
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.