Add Reline.pre_input_hook interface

This commit is contained in:
aycabta 2019-05-13 02:20:20 +09:00
Родитель 9cb821b024
Коммит c137f015ab
2 изменённых файлов: 10 добавлений и 0 удалений

Просмотреть файл

@ -68,6 +68,14 @@ module Reline
@@completion_proc = p
end
@@pre_input_hook = nil
def self.pre_input_hook
@@pre_input_hook
end
def self.pre_input_hook=(p)
@@pre_input_hook = p
end
@@dig_perfect_match_proc = nil
def self.dig_perfect_match_proc
@@dig_perfect_match_proc
@ -155,6 +163,7 @@ module Reline
@@line_editor.output = @@output
@@line_editor.completion_proc = @@completion_proc
@@line_editor.dig_perfect_match_proc = @@dig_perfect_match_proc
@@line_editor.pre_input_hook = @@pre_input_hook
@@line_editor.retrieve_completion_block = method(:retrieve_completion_block)
@@line_editor.rerender

Просмотреть файл

@ -9,6 +9,7 @@ class Reline::LineEditor
attr_reader :line
attr_accessor :confirm_multiline_termination_proc
attr_accessor :completion_proc
attr_accessor :pre_input_hook
attr_accessor :dig_perfect_match_proc
attr_writer :retrieve_completion_block
attr_writer :output