run

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2017 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Completions

func Completions(args []string) error

func GenerateBins

func GenerateBins(args []string) error

func GenerateCompletions

func GenerateCompletions(args []string) error

func Run

func Run(args []string) error

Run stuff..

Types

type Command

type Command struct {
	Name         string
	Wrapper      string
	Transformers []string
	FzfComplete  bool `yaml:"fzf-complete"`
	Completers   []string
}

type CommandRunner

type CommandRunner struct {
	Name    string `yaml:"name"`
	Command string `yaml:"command"`
}

func (*CommandRunner) Key

func (c *CommandRunner) Key() string

func (*CommandRunner) Run

func (c *CommandRunner) Run(arg string, match map[string]string) (string, error)

type Config

type Config struct {
	Imports           []string
	Transformers      []*MatchRunner
	Completers        []*MatchRunner
	Commands          []*Command
	CommandLookup     map[string]*Command
	TransformerLookup map[string]*MatchRunner
	CompleterLookup   map[string]*MatchRunner
	Shell             string
}

func AutoLoadConfig

func AutoLoadConfig() (*Config, error)

func LoadConfig

func LoadConfig(f string) (*Config, error)

type EmptyOutError

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

func (*EmptyOutError) Error

func (e *EmptyOutError) Error() string

type MatchRunner

type MatchRunner struct {
	Match     string `yaml:"match"`
	PrevMatch string `yaml:"prev-match"`
	Name      string `yaml:"name"`
	Cache     int    `yaml:"cache"`
	// contains filtered or unexported fields
}

func (*MatchRunner) CheckMatch

func (m *MatchRunner) CheckMatch(args []string, i int) (map[string]string, error)

func (*MatchRunner) Key

func (m *MatchRunner) Key(a ...string) string

func (*MatchRunner) Run

func (m *MatchRunner) Run(args []string, i int, match map[string]string) (string, error)

func (*MatchRunner) UnmarshalYAML

func (m *MatchRunner) UnmarshalYAML(unmarshal func(v interface{}) error) error

type Runner

type Runner interface {
	Run(string, map[string]string) (string, error)
	Key() string
}

Jump to

Keyboard shortcuts

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