mirror of
https://github.com/junegunn/fzf.git
synced 2025-08-14 11:45:48 -07:00
Add --tmux option to replace fzf-tmux script
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user