summaryrefslogtreecommitdiff
path: root/lib/reline
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-11-13 15:28:12 +0900
committeraycabta <aycabta@gmail.com>2019-11-19 02:39:02 +0900
commitcef9ebfbd3565f9feb25d0140da3176ea26bf4a9 (patch)
tree41503369774ed5a67585574a583a0e468f79dfe2 /lib/reline
parent473e314791964019e017410fb761b873d61e591c (diff)
Suppress `stty` error on Apple Terminal
`stty` called in `Reline::ANSI.deprep` command shows the following error message on macOS Apple Terminal, with some settings. ``` $ LANG=C irb irb(main):001:0> stty: 'standard input': unable to perform all requested operations stty: 'standard input': unable to perform all requested operations ```
Diffstat (limited to 'lib/reline')
-rw-r--r--lib/reline/ansi.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/reline/ansi.rb b/lib/reline/ansi.rb
index 35497ab9e2..9b83a00df4 100644
--- a/lib/reline/ansi.rb
+++ b/lib/reline/ansi.rb
@@ -135,7 +135,7 @@ class Reline::ANSI
def self.deprep(otio)
int_handle = Signal.trap('INT', 'IGNORE')
- `stty #{otio}`
+ system("stty #{otio}", err: File::NULL)
Signal.trap('INT', int_handle)
Signal.trap('WINCH', @@old_winch_handler) if @@old_winch_handler
end