m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-16 15:23:48 -05:00

Add --tty-default=/dev/tty and --no-tty-default option (#4352)

Fix #4242.

Use --no-tty-default, if you want fzf to perform a TTY look-up instead of defaulting to /dev/tty.
This commit is contained in:
Junegunn Choi
2025-04-20 11:24:50 +09:00
committed by GitHub
parent e491770f1c
commit 1d761684c5
9 changed files with 53 additions and 27 deletions

View File

@@ -44,11 +44,11 @@ func ttyname() string {
}
// TtyIn returns terminal device to read user input
func TtyIn() (*os.File, error) {
return openTtyIn()
func TtyIn(ttyDefault string) (*os.File, error) {
return openTtyIn(ttyDefault)
}
// TtyIn returns terminal device to write to
func TtyOut() (*os.File, error) {
return openTtyOut()
func TtyOut(ttyDefault string) (*os.File, error) {
return openTtyOut(ttyDefault)
}