Documentation ¶
Index ¶
Constants ¶
View Source
const ( CY_HOOK = "cy" TEST_PROMPT = "\033Pcy\033\\$ " )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command struct { // The directory in which this command was executed, as provided by // OSC-7 Directory string // The human-readable representation of this command as it appeared // originally. Text string // In certain circumstances, input is not contiguous Input []search.Selection // But output always is Output search.Selection // Whether this command is still in progress. If true, `Output` will // not be valid. Pending bool // The indices of the event where each of these stages occurred. // The event at which the user was prompted Prompted int // The event at which the command was executed (it was finished being // input) Executed int // The event at which the command finished executing (its output ended) Completed int // The time at which this command was executed ExecutedAt time.Time // The time at which this command finished executing CompletedAt time.Time // contains filtered or unexported fields }
func (Command) InputStart ¶
type CommandHandler ¶ added in v0.11.0
type CommandHandler func(Command)
type Detector ¶
type Detector struct {
// contains filtered or unexported fields
}
type DirectoryProvider ¶ added in v0.11.0
type DirectoryProvider func() string
type Option ¶ added in v0.11.0
type Option func(*Detector)
func WithDirectoryProvider ¶ added in v0.11.0
func WithDirectoryProvider(c DirectoryProvider) Option
WithDirectoryProvider provides a function that will be called to get the current directory of the process attached to the terminal.
func WithHandler ¶ added in v0.11.0
func WithHandler(c CommandHandler) Option
WithHandler allows you to provide a callback that will be invoked whenever a command finishes executing.
Click to show internal directories.
Click to hide internal directories.