From 11476e9902405b90b7493fed43f9fc2e6db9a32c Mon Sep 17 00:00:00 2001 From: aycabta Date: Sun, 12 May 2019 23:20:51 +0900 Subject: Check INPUTRC env in Reline::Config --- lib/reline.rb | 2 +- lib/reline/config.rb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/reline.rb b/lib/reline.rb index 96b78587b5..42dbd3e8e9 100644 --- a/lib/reline.rb +++ b/lib/reline.rb @@ -31,7 +31,6 @@ module Reline end @@config = Reline::Config.new - @@config.read @@line_editor = Reline::LineEditor.new(@@config) @@ambiguous_width = nil @@ -134,6 +133,7 @@ module Reline def inner_readline(prompt, add_hist, multiline, &confirm_multiline_termination) otio = prep + @@config.read may_req_ambiguous_char_width if multiline diff --git a/lib/reline/config.rb b/lib/reline/config.rb index 0800dfd30f..6e4ccd544c 100644 --- a/lib/reline/config.rb +++ b/lib/reline/config.rb @@ -37,6 +37,7 @@ class Reline::Config end def read(file = DEFAULT_PATH) + file = ENV['INPUTRC'] if ENV['INPUTRC'] begin if file.respond_to?(:readlines) lines = file.readlines -- cgit v1.2.3