completion

package
v0.0.0-...-57fe098 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package completion contains utilities for implementing shell auto-completion.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ValidArgsFunc

type ValidArgsFunc func(
	*cobra.Command,
	[]string,
	string,
) ([]string, cobra.ShellCompDirective)

ValidArgsFunc is a function for use with cobra.Command.ValidArgsFunction.

func Positional

func Positional(funcs ...ValidArgsFunc) ValidArgsFunc

Positional returns a ValidArgsFunc that delegates to the n'th function when the n'th argument is being completed.

func RepoName

func RepoName(
	con *imbue.Container,
	loc ...api.Locality,
) ValidArgsFunc

RepoName returns a ValidArgsFunc that completes the argument at the given position using the known repository names.

func SourceName

func SourceName(
	con *imbue.Container,
) ValidArgsFunc

SourceName returns a ValidArgsFunc that completes the argument at the given position using the known repository source names.

Jump to

Keyboard shortcuts

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