install

package
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package install provide installation functions of command completion.

Index

Constants

View Source
const (
	Bash = "bash"
	Zsh  = "zsh"
	Fish = "fish"
)

Variables

View Source
var ErrNoShellsFound = errors.New("Did not find any shells to uninstall")

Functions

func EnsureInstall

func EnsureInstall(cmd string, shells ...string) error

EnsureInstall complete command given: cmd: is the command name

func Install

func Install(cmd string) error

Install complete command given: cmd: is the command name

func IsInstalled

func IsInstalled(cmd string) bool

IsInstalled returns true if the completion for the given cmd is installed.

func NewSimpleSearcher

func NewSimpleSearcher(line string) script.Modifier

func Run

func Run(name string, uninstall, yes bool, out io.Writer, in io.Reader)

func Uninstall

func Uninstall(cmd string) error

Uninstall complete command given: cmd: is the command name

Types

type SimpleSearcher

type SimpleSearcher struct {
	// contains filtered or unexported fields
}

SimpleSearcher is a modifier that filters only line that equal line we are searching for. If Invert was set only line that did

func (SimpleSearcher) Modify

func (g SimpleSearcher) Modify(line []byte) (modifed []byte, err error)

func (SimpleSearcher) Name

func (g SimpleSearcher) Name() string

Jump to

Keyboard shortcuts

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