iterfzf icon indicating copy to clipboard operation
iterfzf copied to clipboard

Raise exception when fzf gives 'Inappropriate ioctl for device'

Open crabdancing opened this issue 4 years ago • 2 comments

In some contexts, fzf will immediately fail with 'inappropriate ioctl for device' (e.g., if you are on a non-interactive shell). From the code's perspective, this failure is silent and can only be inferred through the absence of a return value. I think it would be better to raise an exception so that it can be handled more gracefully, and to furthermore catch the error message so as to avoid side effects.

crabdancing avatar Mar 25 '21 22:03 crabdancing

Could you provide an instruction or code to reproduce it?

dahlia avatar Mar 31 '21 16:03 dahlia

It happens when I attempt to test my program in PyCharm. When it tries to launch fzf, it fails to attach to the terminal since it's non-interactive.

crabdancing avatar Mar 31 '21 16:03 crabdancing