summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xfzf8
1 files changed, 7 insertions, 1 deletions
diff --git a/fzf b/fzf
index f0f5689b..03454126 100755
--- a/fzf
+++ b/fzf
@@ -841,7 +841,13 @@ class FZF
end
def get_input actions
- @tty ||= IO.open(IO.sysopen('/dev/tty'), 'r')
+ @tty ||=
+ begin
+ require 'io/console'
+ IO.console
+ rescue LoadError
+ IO.open(IO.sysopen('/dev/tty'), 'r')
+ end
if pending = @pending
@pending = nil