Documentation
¶
Overview ¶
Package exec implements fd's command execution feature (-x/--exec and -X/--exec-batch), including placeholder substitution and batching.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommandSet ¶
type CommandSet struct {
// contains filtered or unexported fields
}
CommandSet is a collection of command templates run in one of the two modes.
func NewBatchCommandSet ¶
func NewBatchCommandSet(input [][]string) (*CommandSet, error)
NewBatchCommandSet builds a batch command set.
func NewCommandSet ¶
func NewCommandSet(input [][]string) (*CommandSet, error)
NewCommandSet builds a one-by-one command set. Each element of input is a command (a list of arguments).
func (*CommandSet) Execute ¶
func (cs *CommandSet) Execute(input string, pathSeparator string, bufferOutput bool) bool
Execute runs all commands for a single input path. Returns true on success.
func (*CommandSet) ExecuteBatch ¶
func (cs *CommandSet) ExecuteBatch(paths []string, limit int, pathSeparator string) bool
ExecuteBatch runs the command(s) once (or in chunks of limit) with all paths.
func (*CommandSet) InBatchMode ¶
func (cs *CommandSet) InBatchMode() bool
InBatchMode reports whether the set runs in batch mode.
Click to show internal directories.
Click to hide internal directories.