summaryrefslogtreecommitdiff
path: root/src/core.go
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2024-05-10 01:40:56 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2024-05-18 17:08:36 +0900
commit83b603390683d49ff75b72d142b4dba4b5186d73 (patch)
tree103394f2ffab559d08528ed50a342f80c61d392b /src/core.go
parent01e7668915c4e3cf8c9eeca283d41beac924fe1f (diff)
downloadfzf-83b603390683d49ff75b72d142b4dba4b5186d73.tar.gz
Add --tmux option to replace fzf-tmux script
Diffstat (limited to 'src/core.go')
-rw-r--r--src/core.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core.go b/src/core.go
index 2a07b82a..17b7d1df 100644
--- a/src/core.go
+++ b/src/core.go
@@ -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
}