package
0.1.5
Repository: https://github.com/coxley/complete.git
Documentation: pkg.go.dev

# Functions

Cached returns a predictor that can re-use previous values for some time until needing to regenerate.
Dirs will search for directories in the given started to be typed path, if no path was started to be typed, it will complete to directories in the current working directory.
Files will search for files matching the given pattern in the started to be typed path, if no path was started to be typed, it will complete to files that match the pattern in the current working directory.
FileSet predict according to file rules to a given set of file names.
Func determines what terms can follow a command or a flag It is used for auto completion, given last - the last word in the already in the command line, what words can complete it.
Or unions two predicate functions, so that the result predicate returns the union of their predication.
ScopedCache returns a cached predictor that is scoped manually instead of by the command.
Set expects specific set of terms, given in the options argument.

# Constants

CachedDir is the parent directory under the user cache dir that cached suggestions will be stored.

# Variables

Anything expects something, but nothing particular, such as a number or arbitrary name.
Nothing does not expect anything after.
Allow overriding for tests, but defaults to the operating system's preferred location.

# Interfaces

Predictor implements a predict method, in which given command line arguments returns a list of options it predicts.