completion

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2022 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FilepathCode       = 99
	DirectoryCode      = 98
	CustomFilepathCode = 97
)

Completion script sees these codes and uses compgen to complete the right thing.

Variables

This section is empty.

Functions

func CustomFilepath

func CustomFilepath(ctx *ProviderCtx, files []string) []string

func Directory

func Directory(ctx *ProviderCtx) []string

func Filepath

func Filepath(ctx *ProviderCtx) []string

func List

func List(partial string) []string

Types

type Provider

type Provider func(ctx *ProviderCtx) []string

type ProviderCtx

type ProviderCtx struct {
	Flags    map[string]string
	Command  []string
	Partial  string
	ExitCode *uint8
}

func (*ProviderCtx) CommandBeginsWith

func (ctx *ProviderCtx) CommandBeginsWith(cmd ...string) bool

func (*ProviderCtx) CommandIs

func (ctx *ProviderCtx) CommandIs(cmd ...string) bool

Jump to

Keyboard shortcuts

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