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

@@ -139,7 +139,8 @@ func DurWithin(
// IsTty returns true if stdin is a terminal
func IsTty() bool {
return isatty.IsTerminal(os.Stdin.Fd())
fd := os.Stdin.Fd()
return isatty.IsTerminal(fd) || isatty.IsCygwinTerminal(fd)
}
// ToTty returns true if stdout is a terminal