diff options
| author | Junegunn Choi <junegunn.c@gmail.com> | 2014-10-07 11:49:40 +0900 |
|---|---|---|
| committer | Junegunn Choi <junegunn.c@gmail.com> | 2014-10-07 11:49:40 +0900 |
| commit | d1387bf512c1ffee64140e07f95a82e78873ffc3 (patch) | |
| tree | 1a7e8cee9b42b675e9d063244d2a8ae949ad15cb | |
| parent | 4c923a2d19f3b82e416644e28581fb78623c16b7 (diff) | |
| download | fzf-d1387bf512c1ffee64140e07f95a82e78873ffc3.tar.gz | |
Use IO.console when possible
| -rwxr-xr-x | fzf | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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 |
