ruby-changes:57767
From: Nobuyoshi <ko1@a...>
Date: Tue, 17 Sep 2019 15:26:32 +0900 (JST)
Subject: [ruby-changes:57767] 68ffb679d4 (master): Undefine DSUSP key
https://git.ruby-lang.org/ruby.git/commit/?id=68ffb679d4 From 68ffb679d461722da6ef0bcdb2f18d8929d98204 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Sat, 14 Sep 2019 00:41:04 +0900 Subject: Undefine DSUSP key Enable `Ctrl+Y`, which is bound with it by default on BSD-like systems, for editing. diff --git a/lib/reline/ansi.rb b/lib/reline/ansi.rb index a3401b9..9d9f79f 100644 --- a/lib/reline/ansi.rb +++ b/lib/reline/ansi.rb @@ -115,9 +115,13 @@ class Reline::ANSI https://github.com/ruby/ruby/blob/trunk/lib/reline/ansi.rb#L115 int_handle = Signal.trap('INT', 'IGNORE') otio = `stty -g`.chomp setting = ' -echo -icrnl cbreak' - if /-parenb\b/ =~ `stty -a` + stty = `stty -a` + if /-parenb\b/ =~ stty setting << ' pass8' end + if /\bdsusp *=/ =~ stty + setting << ' dsusp undef' + end setting << ' -ixoff' `stty #{setting}` Signal.trap('INT', int_handle) -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/