cmd

package
v2.0.25+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2018 License: MIT Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendRecord

func AppendRecord(path, file string)

Fileに追記する

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func Fatal

func Fatal(v ...interface{})

func GetDestination added in v1.1.21

func GetDestination(args []string) (string, string, error)

func Print

func Print(v ...interface{})

func PrintInitText

func PrintInitText()

func PrintVersion

func PrintVersion()

Types

type CdxAction added in v1.1.21

type CdxAction struct {
	Destnation string
	Command    string
	Output     []byte
}

func NewAction added in v1.1.21

func NewAction(command string, dst string) CdxAction

func (CdxAction) Print added in v1.1.21

func (act CdxAction) Print()

func (*CdxAction) Run added in v1.1.21

func (act *CdxAction) Run()

type Config

type Config struct {
	HistoryFile  string
	BookMarkFile string
	Command      string
	NoOutput     bool
	Make         bool
	CustomSource []CustomSource
	FuzzyFinder  FuzzyFinder
	BinaryPath   string
}

type CustomSource

type CustomSource struct {
	Name        string
	SubName     rune
	Command     string
	BeginColumn int
	Action      string
}
var BookmarkCustomSource CustomSource
var HistoryCustomSource CustomSource

func BuildCustomSource

func BuildCustomSource(list ...CustomSource) CustomSource

複数のCustomSourceを連結する

func (CustomSource) Equals

func (cs CustomSource) Equals(second CustomSource) bool

func (CustomSource) GetPathWithFinder

func (cs CustomSource) GetPathWithFinder(begins []int) (string, error)

FuzzyFinderをつかってパス取得。AfterCommandのインデックスを返す

func (CustomSource) ToString added in v1.1.21

func (cs CustomSource) ToString() string

type FuzzyFinder

type FuzzyFinder struct {
	CommandPath string
	Options     []string
}

func (FuzzyFinder) GetCommand

func (ff FuzzyFinder) GetCommand() []string

type Record

type Record struct {
	Number int
	Path   string
}

func (Record) Compare

func (s Record) Compare(t Record) bool

func (Record) ToString

func (rcd Record) ToString() string

type Version

type Version struct {
	Major  int
	Minor  int
	Build  int
	Status string
	Date   string
}

func (Version) ToString

func (v Version) ToString() string

Jump to

Keyboard shortcuts

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