Add --tmux option to replace fzf-tmux script

This commit is contained in:
Junegunn Choi
2024-05-10 01:40:56 +09:00
parent 01e7668915
commit 83b6033906
12 changed files with 313 additions and 9 deletions

View File

@@ -2,6 +2,7 @@
package fzf
import (
"os"
"sync"
"time"
@@ -19,6 +20,10 @@ Matcher -> EvtHeader -> Terminal (update header)
// Run starts fzf
func Run(opts *Options) (int, error) {
if opts.Tmux != nil && len(os.Getenv("TMUX")) > 0 {
return runTmux(os.Args[1:], opts)
}
if err := postProcessOptions(opts); err != nil {
return ExitError, err
}