summaryrefslogtreecommitdiff
path: root/src/core.go
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2024-05-20 17:06:44 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2024-05-20 18:24:14 +0900
commit573df524fed1c493ce7d8ea893f06ab90f2ca18a (patch)
tree0bd1185bf827de5860aaf6a4944c2fd1c8ed69ef /src/core.go
parentaee417c46a2f6d2aa87ea3fcc799fdc7bc830dfe (diff)
downloadfzf-573df524fed1c493ce7d8ea893f06ab90f2ca18a.tar.gz
Use winpty to launch fzf in Git bash (mintty)
Close #3806 Known limitation: * --height cannot be used
Diffstat (limited to 'src/core.go')
-rw-r--r--src/core.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/core.go b/src/core.go
index 17b7d1df..9c5ac033 100644
--- a/src/core.go
+++ b/src/core.go
@@ -21,7 +21,11 @@ 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)
+ return runTmux(os.Args, opts)
+ }
+
+ if os.Getenv("TERM_PROGRAM") == "mintty" && !opts.NoWinpty {
+ return runWinpty(os.Args, opts)
}
if err := postProcessOptions(opts); err != nil {