Use winpty to launch fzf in Git bash (mintty)

Close #3806

Known limitation:
* --height cannot be used
This commit is contained in:
Junegunn Choi
2024-05-20 17:06:44 +09:00
parent aee417c46a
commit 573df524fe
12 changed files with 315 additions and 157 deletions

View File

@@ -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 {