Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IDGenerator ¶
type IDGenerator interface {
Next() uint64
}
IDGenerator defines an interface for things that generate unique IDs for lines used within peco.
type Line ¶
type Line interface {
btree.Item
ID() uint64
// Buffer returns the raw buffer
Buffer() string
// DisplayString returns the string to be displayed. This means if you have
// a null separator, the contents after the separator are not included
// in this string
DisplayString() string
// Output returns the string to be display as peco finishes up doing its
// thing. This means if you have null separator, the contents before the
// separator are not included in this string
Output() string
// IsDirty returns true if this line should be forcefully redrawn
IsDirty() bool
// SetDirty sets the dirty flag on or off
SetDirty(bool)
}
Line represents each of the line that peco uses to display and match against queries.
type Matched ¶
type Matched struct {
Line
// contains filtered or unexported fields
}
Matched contains the indices to the matches
func NewMatched ¶
NewMatched creates a new Matched
type Raw ¶
type Raw struct {
// contains filtered or unexported fields
}
Raw is the input line as sent to peco, before filtering and what not.
func NewRaw ¶
NewRaw creates a new Raw. The `enableSep` flag tells it if we should search for a null character to split the string to display and the string to emit upon selection of of said line
func (Raw) DisplayString ¶
DisplayString returns the string to be displayed
Click to show internal directories.
Click to hide internal directories.