diff options
| author | Junegunn Choi <junegunn.c@gmail.com> | 2024-04-27 18:36:37 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-27 18:36:37 +0900 |
| commit | a4391aeedd4fec1865d2d646711f58d04058531b (patch) | |
| tree | 73a6862010c323f380a3105f929b41a39c7a3753 /src/core.go | |
| parent | b86a967ee217f4c820249701218a17eaad2737ae (diff) | |
| download | fzf-a4391aeedd4fec1865d2d646711f58d04058531b.tar.gz | |
Add --with-shell for shelling out with different command and flags (#3746)
Close #3732
Diffstat (limited to 'src/core.go')
| -rw-r--r-- | src/core.go | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/core.go b/src/core.go index ec137698..14aa781f 100644 --- a/src/core.go +++ b/src/core.go @@ -121,13 +121,16 @@ func Run(opts *Options, version string, revision string) { }) } + // Process executor + executor := util.NewExecutor(opts.WithShell) + // Reader streamingFilter := opts.Filter != nil && !sort && !opts.Tac && !opts.Sync var reader *Reader if !streamingFilter { reader = NewReader(func(data []byte) bool { return chunkList.Push(data) - }, eventBox, opts.ReadZero, opts.Filter == nil) + }, eventBox, executor, opts.ReadZero, opts.Filter == nil) go reader.ReadSource(opts.WalkerRoot, opts.WalkerOpts, opts.WalkerSkip) } @@ -178,7 +181,7 @@ func Run(opts *Options, version string, revision string) { mutex.Unlock() } return false - }, eventBox, opts.ReadZero, false) + }, eventBox, executor, opts.ReadZero, false) reader.ReadSource(opts.WalkerRoot, opts.WalkerOpts, opts.WalkerSkip) } else { eventBox.Unwatch(EvtReadNew) @@ -209,7 +212,7 @@ func Run(opts *Options, version string, revision string) { go matcher.Loop() // Terminal I/O - terminal := NewTerminal(opts, eventBox) + terminal := NewTerminal(opts, eventBox, executor) maxFit := 0 // Maximum number of items that can fit on screen padHeight := 0 heightUnknown := opts.Height.auto |
