# File reline/config.rb, line 48 def initialize @additional_key_bindings = {} # from inputrc @additional_key_bindings[:emacs] = {} @additional_key_bindings[:vi_insert] = {} @additional_key_bindings[:vi_command] = {} @oneshot_key_bindings = {} @skip_section = nil @if_stack = nil @editing_mode_label = :emacs @keymap_label = :emacs @key_actors = {} @key_actors[:emacs] = Reline::KeyActor::Emacs.new @key_actors[:vi_insert] = Reline::KeyActor::ViInsert.new @key_actors[:vi_command] = Reline::KeyActor::ViCommand.new @vi_cmd_mode_string = '(cmd)' @vi_ins_mode_string = '(ins)' @emacs_mode_string = '@' # https://tiswww.case.edu/php/chet/readline/readline.html#IDX25 @history_size = -1 # unlimited @keyseq_timeout = 500 @test_mode = false @autocompletion = false @convert_meta = true if seven_bit_encoding?(Reline::IOGate.encoding) end
# File reline/config.rb, line 100 def autocompletion @autocompletion end
# File reline/config.rb, line 96 def autocompletion=(val) @autocompletion = val end
# File reline/config.rb, line 84 def editing_mode @key_actors[@editing_mode_label] end
# File reline/config.rb, line 88 def editing_mode=(val) @editing_mode_label = val end
# File reline/config.rb, line 92 def editing_mode_is?(*val) (val.respond_to?(:any?) ? val : [val]).any?(@editing_mode_label) end
# File reline/config.rb, line 108 def inputrc_path case ENV['INPUTRC'] when nil, '' else return File.expand_path(ENV['INPUTRC']) end # In the XDG Specification, if ~/.config/readline/inputrc exists, then # ~/.inputrc should not be read, but for compatibility with GNU Readline, # if ~/.inputrc exists, then it is given priority. home_rc_path = File.expand_path('~/.inputrc') return home_rc_path if File.exist?(home_rc_path) case path = ENV['XDG_CONFIG_HOME'] when nil, '' else path = File.join(path, 'readline/inputrc') return path if File.exist?(path) and path == File.expand_path(path) end path = File.expand_path('~/.config/readline/inputrc') return path if File.exist?(path) return home_rc_path end