-
Notifications
You must be signed in to change notification settings - Fork 507
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Snippet with fzf fails with "Failed to read /dev/tty" #267
Comments
Your problem is the way linux handles tty's. Terminals are created by calls to openpty which creates something of a pipe that goes through the kernel terminal driver. The driver is responsible for turning ctrl-c into a SIGINT etc. Programs detect the presense of a terminal with isatty which does some ioctl-calls and queries information associated with the file descriptor of stdin. My guess is that running a command with I'll see if I can find something about rusts |
As a side note: |
I found the issue: rather than some complicated terminal magic not working as intended you missed a call to I also performed a little test with a demo program that executed fzf without waiting for the child process. For some reason I got the fzf ui while my keypresses where sent to my shell and fzf seemingly at random. Sometimes I was able to narrow down fzf search results and sometimes I got autocompletion from my shell in the fzf ui. |
fixed issue of terminal programs like fzf not recognizing stdin as terminal (#267)
The following cheatsheet fails:
I have already tried all tricks with
exec
,stty
,< /dev/tty
and so on. Help needed.The text was updated successfully, but these errors were encountered: