Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ExeBy/exe_root.../opt/alt/ruby30/share/ruby
File: reline.rb
require 'io/console'
[0] Fix | Delete
require 'timeout'
[1] Fix | Delete
require 'forwardable'
[2] Fix | Delete
require 'reline/version'
[3] Fix | Delete
require 'reline/config'
[4] Fix | Delete
require 'reline/key_actor'
[5] Fix | Delete
require 'reline/key_stroke'
[6] Fix | Delete
require 'reline/line_editor'
[7] Fix | Delete
require 'reline/history'
[8] Fix | Delete
require 'rbconfig'
[9] Fix | Delete
[10] Fix | Delete
module Reline
[11] Fix | Delete
FILENAME_COMPLETION_PROC = nil
[12] Fix | Delete
USERNAME_COMPLETION_PROC = nil
[13] Fix | Delete
[14] Fix | Delete
Key = Struct.new('Key', :char, :combined_char, :with_meta)
[15] Fix | Delete
CursorPos = Struct.new(:x, :y)
[16] Fix | Delete
[17] Fix | Delete
class Core
[18] Fix | Delete
ATTR_READER_NAMES = %i(
[19] Fix | Delete
completion_append_character
[20] Fix | Delete
basic_word_break_characters
[21] Fix | Delete
completer_word_break_characters
[22] Fix | Delete
basic_quote_characters
[23] Fix | Delete
completer_quote_characters
[24] Fix | Delete
filename_quote_characters
[25] Fix | Delete
special_prefixes
[26] Fix | Delete
completion_proc
[27] Fix | Delete
output_modifier_proc
[28] Fix | Delete
prompt_proc
[29] Fix | Delete
auto_indent_proc
[30] Fix | Delete
pre_input_hook
[31] Fix | Delete
dig_perfect_match_proc
[32] Fix | Delete
).each(&method(:attr_reader))
[33] Fix | Delete
[34] Fix | Delete
attr_accessor :config
[35] Fix | Delete
attr_accessor :key_stroke
[36] Fix | Delete
attr_accessor :line_editor
[37] Fix | Delete
attr_accessor :last_incremental_search
[38] Fix | Delete
attr_reader :output
[39] Fix | Delete
[40] Fix | Delete
def initialize
[41] Fix | Delete
self.output = STDOUT
[42] Fix | Delete
yield self
[43] Fix | Delete
@completion_quote_character = nil
[44] Fix | Delete
@bracketed_paste_finished = false
[45] Fix | Delete
end
[46] Fix | Delete
[47] Fix | Delete
def encoding
[48] Fix | Delete
Reline::IOGate.encoding
[49] Fix | Delete
end
[50] Fix | Delete
[51] Fix | Delete
def completion_append_character=(val)
[52] Fix | Delete
if val.nil?
[53] Fix | Delete
@completion_append_character = nil
[54] Fix | Delete
elsif val.size == 1
[55] Fix | Delete
@completion_append_character = val.encode(Reline::IOGate.encoding)
[56] Fix | Delete
elsif val.size > 1
[57] Fix | Delete
@completion_append_character = val[0].encode(Reline::IOGate.encoding)
[58] Fix | Delete
else
[59] Fix | Delete
@completion_append_character = nil
[60] Fix | Delete
end
[61] Fix | Delete
end
[62] Fix | Delete
[63] Fix | Delete
def basic_word_break_characters=(v)
[64] Fix | Delete
@basic_word_break_characters = v.encode(Reline::IOGate.encoding)
[65] Fix | Delete
end
[66] Fix | Delete
[67] Fix | Delete
def completer_word_break_characters=(v)
[68] Fix | Delete
@completer_word_break_characters = v.encode(Reline::IOGate.encoding)
[69] Fix | Delete
end
[70] Fix | Delete
[71] Fix | Delete
def basic_quote_characters=(v)
[72] Fix | Delete
@basic_quote_characters = v.encode(Reline::IOGate.encoding)
[73] Fix | Delete
end
[74] Fix | Delete
[75] Fix | Delete
def completer_quote_characters=(v)
[76] Fix | Delete
@completer_quote_characters = v.encode(Reline::IOGate.encoding)
[77] Fix | Delete
end
[78] Fix | Delete
[79] Fix | Delete
def filename_quote_characters=(v)
[80] Fix | Delete
@filename_quote_characters = v.encode(Reline::IOGate.encoding)
[81] Fix | Delete
end
[82] Fix | Delete
[83] Fix | Delete
def special_prefixes=(v)
[84] Fix | Delete
@special_prefixes = v.encode(Reline::IOGate.encoding)
[85] Fix | Delete
end
[86] Fix | Delete
[87] Fix | Delete
def completion_case_fold=(v)
[88] Fix | Delete
@config.completion_ignore_case = v
[89] Fix | Delete
end
[90] Fix | Delete
[91] Fix | Delete
def completion_case_fold
[92] Fix | Delete
@config.completion_ignore_case
[93] Fix | Delete
end
[94] Fix | Delete
[95] Fix | Delete
def completion_quote_character
[96] Fix | Delete
@completion_quote_character
[97] Fix | Delete
end
[98] Fix | Delete
[99] Fix | Delete
def completion_proc=(p)
[100] Fix | Delete
raise ArgumentError unless p.respond_to?(:call) or p.nil?
[101] Fix | Delete
@completion_proc = p
[102] Fix | Delete
end
[103] Fix | Delete
[104] Fix | Delete
def output_modifier_proc=(p)
[105] Fix | Delete
raise ArgumentError unless p.respond_to?(:call) or p.nil?
[106] Fix | Delete
@output_modifier_proc = p
[107] Fix | Delete
end
[108] Fix | Delete
[109] Fix | Delete
def prompt_proc=(p)
[110] Fix | Delete
raise ArgumentError unless p.respond_to?(:call) or p.nil?
[111] Fix | Delete
@prompt_proc = p
[112] Fix | Delete
end
[113] Fix | Delete
[114] Fix | Delete
def auto_indent_proc=(p)
[115] Fix | Delete
raise ArgumentError unless p.respond_to?(:call) or p.nil?
[116] Fix | Delete
@auto_indent_proc = p
[117] Fix | Delete
end
[118] Fix | Delete
[119] Fix | Delete
def pre_input_hook=(p)
[120] Fix | Delete
@pre_input_hook = p
[121] Fix | Delete
end
[122] Fix | Delete
[123] Fix | Delete
def dig_perfect_match_proc=(p)
[124] Fix | Delete
raise ArgumentError unless p.respond_to?(:call) or p.nil?
[125] Fix | Delete
@dig_perfect_match_proc = p
[126] Fix | Delete
end
[127] Fix | Delete
[128] Fix | Delete
def input=(val)
[129] Fix | Delete
raise TypeError unless val.respond_to?(:getc) or val.nil?
[130] Fix | Delete
if val.respond_to?(:getc)
[131] Fix | Delete
if defined?(Reline::ANSI) and Reline::IOGate == Reline::ANSI
[132] Fix | Delete
Reline::ANSI.input = val
[133] Fix | Delete
elsif Reline::IOGate == Reline::GeneralIO
[134] Fix | Delete
Reline::GeneralIO.input = val
[135] Fix | Delete
end
[136] Fix | Delete
end
[137] Fix | Delete
end
[138] Fix | Delete
[139] Fix | Delete
def output=(val)
[140] Fix | Delete
raise TypeError unless val.respond_to?(:write) or val.nil?
[141] Fix | Delete
@output = val
[142] Fix | Delete
if defined?(Reline::ANSI) and Reline::IOGate == Reline::ANSI
[143] Fix | Delete
Reline::ANSI.output = val
[144] Fix | Delete
end
[145] Fix | Delete
end
[146] Fix | Delete
[147] Fix | Delete
def vi_editing_mode
[148] Fix | Delete
config.editing_mode = :vi_insert
[149] Fix | Delete
nil
[150] Fix | Delete
end
[151] Fix | Delete
[152] Fix | Delete
def emacs_editing_mode
[153] Fix | Delete
config.editing_mode = :emacs
[154] Fix | Delete
nil
[155] Fix | Delete
end
[156] Fix | Delete
[157] Fix | Delete
def vi_editing_mode?
[158] Fix | Delete
config.editing_mode_is?(:vi_insert, :vi_command)
[159] Fix | Delete
end
[160] Fix | Delete
[161] Fix | Delete
def emacs_editing_mode?
[162] Fix | Delete
config.editing_mode_is?(:emacs)
[163] Fix | Delete
end
[164] Fix | Delete
[165] Fix | Delete
def get_screen_size
[166] Fix | Delete
Reline::IOGate.get_screen_size
[167] Fix | Delete
end
[168] Fix | Delete
[169] Fix | Delete
def readmultiline(prompt = '', add_hist = false, &confirm_multiline_termination)
[170] Fix | Delete
unless confirm_multiline_termination
[171] Fix | Delete
raise ArgumentError.new('#readmultiline needs block to confirm multiline termination')
[172] Fix | Delete
end
[173] Fix | Delete
inner_readline(prompt, add_hist, true, &confirm_multiline_termination)
[174] Fix | Delete
[175] Fix | Delete
whole_buffer = line_editor.whole_buffer.dup
[176] Fix | Delete
whole_buffer.taint if RUBY_VERSION < '2.7'
[177] Fix | Delete
if add_hist and whole_buffer and whole_buffer.chomp("\n").size > 0
[178] Fix | Delete
Reline::HISTORY << whole_buffer
[179] Fix | Delete
end
[180] Fix | Delete
[181] Fix | Delete
line_editor.reset_line if line_editor.whole_buffer.nil?
[182] Fix | Delete
whole_buffer
[183] Fix | Delete
end
[184] Fix | Delete
[185] Fix | Delete
def readline(prompt = '', add_hist = false)
[186] Fix | Delete
inner_readline(prompt, add_hist, false)
[187] Fix | Delete
[188] Fix | Delete
line = line_editor.line.dup
[189] Fix | Delete
line.taint if RUBY_VERSION < '2.7'
[190] Fix | Delete
if add_hist and line and line.chomp("\n").size > 0
[191] Fix | Delete
Reline::HISTORY << line.chomp("\n")
[192] Fix | Delete
end
[193] Fix | Delete
[194] Fix | Delete
line_editor.reset_line if line_editor.line.nil?
[195] Fix | Delete
line
[196] Fix | Delete
end
[197] Fix | Delete
[198] Fix | Delete
private def inner_readline(prompt, add_hist, multiline, &confirm_multiline_termination)
[199] Fix | Delete
if ENV['RELINE_STDERR_TTY']
[200] Fix | Delete
if Reline::IOGate.win?
[201] Fix | Delete
$stderr = File.open(ENV['RELINE_STDERR_TTY'], 'a')
[202] Fix | Delete
else
[203] Fix | Delete
$stderr.reopen(ENV['RELINE_STDERR_TTY'], 'w')
[204] Fix | Delete
end
[205] Fix | Delete
$stderr.sync = true
[206] Fix | Delete
$stderr.puts "Reline is used by #{Process.pid}"
[207] Fix | Delete
end
[208] Fix | Delete
otio = Reline::IOGate.prep
[209] Fix | Delete
[210] Fix | Delete
may_req_ambiguous_char_width
[211] Fix | Delete
line_editor.reset(prompt, encoding: Reline::IOGate.encoding)
[212] Fix | Delete
if multiline
[213] Fix | Delete
line_editor.multiline_on
[214] Fix | Delete
if block_given?
[215] Fix | Delete
line_editor.confirm_multiline_termination_proc = confirm_multiline_termination
[216] Fix | Delete
end
[217] Fix | Delete
else
[218] Fix | Delete
line_editor.multiline_off
[219] Fix | Delete
end
[220] Fix | Delete
line_editor.output = output
[221] Fix | Delete
line_editor.completion_proc = completion_proc
[222] Fix | Delete
line_editor.completion_append_character = completion_append_character
[223] Fix | Delete
line_editor.output_modifier_proc = output_modifier_proc
[224] Fix | Delete
line_editor.prompt_proc = prompt_proc
[225] Fix | Delete
line_editor.auto_indent_proc = auto_indent_proc
[226] Fix | Delete
line_editor.dig_perfect_match_proc = dig_perfect_match_proc
[227] Fix | Delete
line_editor.pre_input_hook = pre_input_hook
[228] Fix | Delete
[229] Fix | Delete
unless config.test_mode
[230] Fix | Delete
config.read
[231] Fix | Delete
config.reset_default_key_bindings
[232] Fix | Delete
Reline::IOGate::RAW_KEYSTROKE_CONFIG.each_pair do |key, func|
[233] Fix | Delete
config.add_default_key_binding(key, func)
[234] Fix | Delete
end
[235] Fix | Delete
end
[236] Fix | Delete
[237] Fix | Delete
line_editor.rerender
[238] Fix | Delete
[239] Fix | Delete
begin
[240] Fix | Delete
prev_pasting_state = false
[241] Fix | Delete
loop do
[242] Fix | Delete
prev_pasting_state = Reline::IOGate.in_pasting?
[243] Fix | Delete
read_io(config.keyseq_timeout) { |inputs|
[244] Fix | Delete
line_editor.set_pasting_state(Reline::IOGate.in_pasting?)
[245] Fix | Delete
inputs.each { |c|
[246] Fix | Delete
line_editor.input_key(c)
[247] Fix | Delete
line_editor.rerender
[248] Fix | Delete
}
[249] Fix | Delete
if @bracketed_paste_finished
[250] Fix | Delete
line_editor.rerender_all
[251] Fix | Delete
@bracketed_paste_finished = false
[252] Fix | Delete
end
[253] Fix | Delete
}
[254] Fix | Delete
if prev_pasting_state == true and not Reline::IOGate.in_pasting? and not line_editor.finished?
[255] Fix | Delete
line_editor.set_pasting_state(false)
[256] Fix | Delete
prev_pasting_state = false
[257] Fix | Delete
line_editor.rerender_all
[258] Fix | Delete
end
[259] Fix | Delete
break if line_editor.finished?
[260] Fix | Delete
end
[261] Fix | Delete
Reline::IOGate.move_cursor_column(0)
[262] Fix | Delete
rescue Errno::EIO
[263] Fix | Delete
# Maybe the I/O has been closed.
[264] Fix | Delete
rescue StandardError => e
[265] Fix | Delete
line_editor.finalize
[266] Fix | Delete
Reline::IOGate.deprep(otio)
[267] Fix | Delete
raise e
[268] Fix | Delete
end
[269] Fix | Delete
[270] Fix | Delete
line_editor.finalize
[271] Fix | Delete
Reline::IOGate.deprep(otio)
[272] Fix | Delete
end
[273] Fix | Delete
[274] Fix | Delete
# Keystrokes of GNU Readline will timeout it with the specification of
[275] Fix | Delete
# "keyseq-timeout" when waiting for the 2nd character after the 1st one.
[276] Fix | Delete
# If the 2nd character comes after 1st ESC without timeout it has a
[277] Fix | Delete
# meta-property of meta-key to discriminate modified key with meta-key
[278] Fix | Delete
# from multibyte characters that come with 8th bit on.
[279] Fix | Delete
#
[280] Fix | Delete
# GNU Readline will wait for the 2nd character with "keyseq-timeout"
[281] Fix | Delete
# milli-seconds but wait forever after 3rd characters.
[282] Fix | Delete
private def read_io(keyseq_timeout, &block)
[283] Fix | Delete
buffer = []
[284] Fix | Delete
loop do
[285] Fix | Delete
c = Reline::IOGate.getc
[286] Fix | Delete
if c == -1
[287] Fix | Delete
result = :unmatched
[288] Fix | Delete
@bracketed_paste_finished = true
[289] Fix | Delete
else
[290] Fix | Delete
buffer << c
[291] Fix | Delete
result = key_stroke.match_status(buffer)
[292] Fix | Delete
end
[293] Fix | Delete
case result
[294] Fix | Delete
when :matched
[295] Fix | Delete
expanded = key_stroke.expand(buffer).map{ |expanded_c|
[296] Fix | Delete
Reline::Key.new(expanded_c, expanded_c, false)
[297] Fix | Delete
}
[298] Fix | Delete
block.(expanded)
[299] Fix | Delete
break
[300] Fix | Delete
when :matching
[301] Fix | Delete
if buffer.size == 1
[302] Fix | Delete
begin
[303] Fix | Delete
succ_c = nil
[304] Fix | Delete
Timeout.timeout(keyseq_timeout / 1000.0) {
[305] Fix | Delete
succ_c = Reline::IOGate.getc
[306] Fix | Delete
}
[307] Fix | Delete
rescue Timeout::Error # cancel matching only when first byte
[308] Fix | Delete
block.([Reline::Key.new(c, c, false)])
[309] Fix | Delete
break
[310] Fix | Delete
else
[311] Fix | Delete
if key_stroke.match_status(buffer.dup.push(succ_c)) == :unmatched
[312] Fix | Delete
if c == "\e".ord
[313] Fix | Delete
block.([Reline::Key.new(succ_c, succ_c | 0b10000000, true)])
[314] Fix | Delete
else
[315] Fix | Delete
block.([Reline::Key.new(c, c, false), Reline::Key.new(succ_c, succ_c, false)])
[316] Fix | Delete
end
[317] Fix | Delete
break
[318] Fix | Delete
else
[319] Fix | Delete
Reline::IOGate.ungetc(succ_c)
[320] Fix | Delete
end
[321] Fix | Delete
end
[322] Fix | Delete
end
[323] Fix | Delete
when :unmatched
[324] Fix | Delete
if buffer.size == 1 and c == "\e".ord
[325] Fix | Delete
read_escaped_key(keyseq_timeout, c, block)
[326] Fix | Delete
else
[327] Fix | Delete
expanded = buffer.map{ |expanded_c|
[328] Fix | Delete
Reline::Key.new(expanded_c, expanded_c, false)
[329] Fix | Delete
}
[330] Fix | Delete
block.(expanded)
[331] Fix | Delete
end
[332] Fix | Delete
break
[333] Fix | Delete
end
[334] Fix | Delete
end
[335] Fix | Delete
end
[336] Fix | Delete
[337] Fix | Delete
private def read_escaped_key(keyseq_timeout, c, block)
[338] Fix | Delete
begin
[339] Fix | Delete
escaped_c = nil
[340] Fix | Delete
Timeout.timeout(keyseq_timeout / 1000.0) {
[341] Fix | Delete
escaped_c = Reline::IOGate.getc
[342] Fix | Delete
}
[343] Fix | Delete
rescue Timeout::Error # independent ESC
[344] Fix | Delete
block.([Reline::Key.new(c, c, false)])
[345] Fix | Delete
else
[346] Fix | Delete
if escaped_c.nil?
[347] Fix | Delete
block.([Reline::Key.new(c, c, false)])
[348] Fix | Delete
elsif escaped_c >= 128 # maybe, first byte of multi byte
[349] Fix | Delete
block.([Reline::Key.new(c, c, false), Reline::Key.new(escaped_c, escaped_c, false)])
[350] Fix | Delete
elsif escaped_c == "\e".ord # escape twice
[351] Fix | Delete
block.([Reline::Key.new(c, c, false), Reline::Key.new(c, c, false)])
[352] Fix | Delete
else
[353] Fix | Delete
block.([Reline::Key.new(escaped_c, escaped_c | 0b10000000, true)])
[354] Fix | Delete
end
[355] Fix | Delete
end
[356] Fix | Delete
end
[357] Fix | Delete
[358] Fix | Delete
def ambiguous_width
[359] Fix | Delete
may_req_ambiguous_char_width unless defined? @ambiguous_width
[360] Fix | Delete
@ambiguous_width
[361] Fix | Delete
end
[362] Fix | Delete
[363] Fix | Delete
private def may_req_ambiguous_char_width
[364] Fix | Delete
@ambiguous_width = 2 if Reline::IOGate == Reline::GeneralIO or STDOUT.is_a?(File)
[365] Fix | Delete
return if @ambiguous_width
[366] Fix | Delete
Reline::IOGate.move_cursor_column(0)
[367] Fix | Delete
begin
[368] Fix | Delete
output.write "\u{25bd}"
[369] Fix | Delete
rescue Encoding::UndefinedConversionError
[370] Fix | Delete
# LANG=C
[371] Fix | Delete
@ambiguous_width = 1
[372] Fix | Delete
else
[373] Fix | Delete
@ambiguous_width = Reline::IOGate.cursor_pos.x
[374] Fix | Delete
end
[375] Fix | Delete
Reline::IOGate.move_cursor_column(0)
[376] Fix | Delete
Reline::IOGate.erase_after_cursor
[377] Fix | Delete
end
[378] Fix | Delete
end
[379] Fix | Delete
[380] Fix | Delete
extend Forwardable
[381] Fix | Delete
extend SingleForwardable
[382] Fix | Delete
[383] Fix | Delete
#--------------------------------------------------------
[384] Fix | Delete
# Documented API
[385] Fix | Delete
#--------------------------------------------------------
[386] Fix | Delete
[387] Fix | Delete
(Core::ATTR_READER_NAMES).each { |name|
[388] Fix | Delete
def_single_delegators :core, "#{name}", "#{name}="
[389] Fix | Delete
}
[390] Fix | Delete
def_single_delegators :core, :input=, :output=
[391] Fix | Delete
def_single_delegators :core, :vi_editing_mode, :emacs_editing_mode
[392] Fix | Delete
def_single_delegators :core, :readline
[393] Fix | Delete
def_single_delegators :core, :completion_case_fold, :completion_case_fold=
[394] Fix | Delete
def_single_delegators :core, :completion_quote_character
[395] Fix | Delete
def_instance_delegators self, :readline
[396] Fix | Delete
private :readline
[397] Fix | Delete
[398] Fix | Delete
[399] Fix | Delete
#--------------------------------------------------------
[400] Fix | Delete
# Undocumented API
[401] Fix | Delete
#--------------------------------------------------------
[402] Fix | Delete
[403] Fix | Delete
# Testable in original
[404] Fix | Delete
def_single_delegators :core, :get_screen_size
[405] Fix | Delete
def_single_delegators :line_editor, :eof?
[406] Fix | Delete
def_instance_delegators self, :eof?
[407] Fix | Delete
def_single_delegators :line_editor, :delete_text
[408] Fix | Delete
def_single_delegator :line_editor, :line, :line_buffer
[409] Fix | Delete
def_single_delegator :line_editor, :byte_pointer, :point
[410] Fix | Delete
def_single_delegator :line_editor, :byte_pointer=, :point=
[411] Fix | Delete
[412] Fix | Delete
def self.insert_text(*args, &block)
[413] Fix | Delete
line_editor.insert_text(*args, &block)
[414] Fix | Delete
self
[415] Fix | Delete
end
[416] Fix | Delete
[417] Fix | Delete
# Untestable in original
[418] Fix | Delete
def_single_delegator :line_editor, :rerender, :redisplay
[419] Fix | Delete
def_single_delegators :core, :vi_editing_mode?, :emacs_editing_mode?
[420] Fix | Delete
def_single_delegators :core, :ambiguous_width
[421] Fix | Delete
def_single_delegators :core, :last_incremental_search
[422] Fix | Delete
def_single_delegators :core, :last_incremental_search=
[423] Fix | Delete
[424] Fix | Delete
def_single_delegators :core, :readmultiline
[425] Fix | Delete
def_instance_delegators self, :readmultiline
[426] Fix | Delete
private :readmultiline
[427] Fix | Delete
[428] Fix | Delete
def self.encoding_system_needs
[429] Fix | Delete
self.core.encoding
[430] Fix | Delete
end
[431] Fix | Delete
[432] Fix | Delete
def self.core
[433] Fix | Delete
@core ||= Core.new { |core|
[434] Fix | Delete
core.config = Reline::Config.new
[435] Fix | Delete
core.key_stroke = Reline::KeyStroke.new(core.config)
[436] Fix | Delete
core.line_editor = Reline::LineEditor.new(core.config, Reline::IOGate.encoding)
[437] Fix | Delete
[438] Fix | Delete
core.basic_word_break_characters = " \t\n`><=;|&{("
[439] Fix | Delete
core.completer_word_break_characters = " \t\n`><=;|&{("
[440] Fix | Delete
core.basic_quote_characters = '"\''
[441] Fix | Delete
core.completer_quote_characters = '"\''
[442] Fix | Delete
core.filename_quote_characters = ""
[443] Fix | Delete
core.special_prefixes = ""
[444] Fix | Delete
}
[445] Fix | Delete
end
[446] Fix | Delete
[447] Fix | Delete
def self.ungetc(c)
[448] Fix | Delete
Reline::IOGate.ungetc(c)
[449] Fix | Delete
end
[450] Fix | Delete
[451] Fix | Delete
def self.line_editor
[452] Fix | Delete
core.line_editor
[453] Fix | Delete
end
[454] Fix | Delete
end
[455] Fix | Delete
[456] Fix | Delete
if RbConfig::CONFIG['host_os'] =~ /mswin|msys|mingw|cygwin|bccwin|wince|emc/
[457] Fix | Delete
require 'reline/windows'
[458] Fix | Delete
if Reline::Windows.msys_tty?
[459] Fix | Delete
require 'reline/ansi'
[460] Fix | Delete
Reline::IOGate = Reline::ANSI
[461] Fix | Delete
else
[462] Fix | Delete
Reline::IOGate = Reline::Windows
[463] Fix | Delete
end
[464] Fix | Delete
else
[465] Fix | Delete
require 'reline/ansi'
[466] Fix | Delete
Reline::IOGate = Reline::ANSI
[467] Fix | Delete
end
[468] Fix | Delete
Reline::HISTORY = Reline::History.new(Reline.core.config)
[469] Fix | Delete
require 'reline/general_io'
[470] Fix | Delete
[471] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function