Slide 45
Slide 45 text
45
# reline.rb
# Simplified original code
private def inner_readline(prompt, add_hist,
multiline, &confirm_multiline_termination)
l = line_editor
l.reset(prompt, encoding: encoding)
# l.confirm_multiline_termination_proc =
confirm_multiline_termination
l.output = output
l.completion_proc = completion_proc
l.completion_append_character =
completion_append_character
l.output_modifier_proc = output_modifier_proc
l.prompt_proc = prompt_proc
l.auto_indent_proc = auto_indent_proc
l.dig_perfect_match_proc = dig_perfect_match_proc
pre_input_hook&.call
@dialog_proc_list.each_pair do |name, d|
l.add_dialog_proc(name,d.dialog_proc,d.context)
end
config.read
io_gate.set_default_key_bindings(config)
Handle input keys
Render
Wait inputs
Initialize
Reline.readline