diff options
| author | Junegunn Choi <junegunn.c@gmail.com> | 2023-05-21 13:51:06 +0900 |
|---|---|---|
| committer | Junegunn Choi <junegunn.c@gmail.com> | 2023-05-21 14:01:27 +0900 |
| commit | 16b0aeda7dda8790d026873f5efd7d6fb344a1dd (patch) | |
| tree | 52d1dad610db8a4f3cc8a97c32cbfa3b934c6f61 /src | |
| parent | 86e4f4a84180da7f5b99c3db8043cb9d92cb9189 (diff) | |
| download | fzf-16b0aeda7dda8790d026873f5efd7d6fb344a1dd.tar.gz | |
Make sure 'become' process is given a proper tty device
Diffstat (limited to 'src')
| -rw-r--r-- | src/terminal.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/terminal.go b/src/terminal.go index f25cd2f3..7f6adade 100644 --- a/src/terminal.go +++ b/src/terminal.go @@ -2961,6 +2961,14 @@ func (t *Terminal) Loop() { if t.history != nil { t.history.append(string(t.input)) } + /* + FIXME: It is not at all clear why this is required. + The following command will report 'not a tty', unless we open + /dev/tty *twice* after closing the standard input for 'reload' + in Reader.terminate(). + : | fzf --bind 'start:reload:ls' --bind 'enter:become:tty' + */ + tui.TtyIn() util.SetStdin(tui.TtyIn()) syscall.Exec(shellPath, []string{shell, "-c", command}, os.Environ()) } |
