pachyderm: github.com/pachyderm/pachyderm/src/server/cmd/pachctl/shell Index | Files

package shell

import "github.com/pachyderm/pachyderm/src/server/cmd/pachctl/shell"

Index

Package Files

completions.go shell.go

func CacheAll Uses

func CacheAll(_, _ string) bool

CacheAll is a CacheFunc that always returns true (always use cached results).

func CacheNone Uses

func CacheNone(_, _ string) bool

CacheNone is a CacheFunc that always returns false (never cache anything).

func RegisterCompletionFunc Uses

func RegisterCompletionFunc(cmd *cobra.Command, completionFunc CompletionFunc)

RegisterCompletionFunc registers a completion function for a command. NOTE: RegisterCompletionFunc must be called before cmd is passed to functions that make copies of it (such as cmdutil.CreateAlias. This is because RegisterCompletionFunc modifies cmd in a superficial way by adding an annotation (to the Annotations field) that associates it with the completion function. This means that

func Run Uses

func Run(rootCmd *cobra.Command, maxCompletions int64)

Run runs a prompt, it does not return.

type CacheFunc Uses

type CacheFunc func(flag, text string) bool

CacheFunc is a function which returns whether or not cached results from a previous call to a CompletionFunc can be reused.

func AndCacheFunc Uses

func AndCacheFunc(fs ...CacheFunc) CacheFunc

AndCacheFunc ands 0 or more cache funcs together.

func BranchCompletion Uses

func BranchCompletion(flag, text string, maxCompletions int64) ([]prompt.Suggest, CacheFunc)

BranchCompletion completes branch parameters of the form <repo>@<branch>

func FileCompletion Uses

func FileCompletion(flag, text string, maxCompletions int64) ([]prompt.Suggest, CacheFunc)

FileCompletion completes file parameters of the form <repo>@<branch>:/file

func FilesystemCompletion Uses

func FilesystemCompletion(_, text string, maxCompletions int64) ([]prompt.Suggest, CacheFunc)

FilesystemCompletion completes file parameters from the local filesystem (not from pfs).

func JobCompletion Uses

func JobCompletion(_, text string, maxCompletions int64) ([]prompt.Suggest, CacheFunc)

JobCompletion completes job parameters of the form <job>

func PipelineCompletion Uses

func PipelineCompletion(_, _ string, maxCompletions int64) ([]prompt.Suggest, CacheFunc)

PipelineCompletion completes pipeline parameters of the form <pipeline>

func RepoCompletion Uses

func RepoCompletion(_, text string, maxCompletions int64) ([]prompt.Suggest, CacheFunc)

RepoCompletion completes repo parameters of the form <repo>

func SameFlag Uses

func SameFlag(flag string) CacheFunc

SameFlag is a CacheFunc that returns true if the flags are the same.

type CompletionFunc Uses

type CompletionFunc func(flag, text string, maxCompletions int64) ([]prompt.Suggest, CacheFunc)

CompletionFunc is a function which returns completions for a command.

Package shell imports 22 packages (graph) and is imported by 7 packages. Updated 2020-04-02. Refresh now. Tools for package owners.