Undefine DSUSP key

Enable `Ctrl+Y`, which is bound with it by default on BSD-like
systems, for editing.
This commit is contained in:
Nobuyoshi Nakada 2019-09-14 00:41:04 +09:00 committed by aycabta
parent b49c1380c1
commit 68ffb679d4

View File

@ -115,9 +115,13 @@ class Reline::ANSI
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)