diff options
author | aycabta <aycabta@gmail.com> | 2019-06-02 07:39:12 +0900 |
---|---|---|
committer | aycabta <aycabta@gmail.com> | 2019-06-02 07:39:12 +0900 |
commit | e360688c4df08c2a43daa00c1de9832a20ad1521 (patch) | |
tree | d745b827c489ab2080a192951388a73891b0259f /lib/reline | |
parent | 28e01f006d124fa8d6d85450f92b188b473921f8 (diff) | |
download | ruby-e360688c4df08c2a43daa00c1de9832a20ad1521.tar.gz |
Add new test for Reline within pipe
Diffstat (limited to 'lib/reline')
-rw-r--r-- | lib/reline/config.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/reline/config.rb b/lib/reline/config.rb index 6fdeb7006f..7639882027 100644 --- a/lib/reline/config.rb +++ b/lib/reline/config.rb @@ -1,6 +1,8 @@ require 'pathname' class Reline::Config + attr_reader :test_mode + DEFAULT_PATH = Pathname.new(Dir.home).join('.inputrc') VARIABLE_NAMES = %w{ @@ -48,6 +50,7 @@ class Reline::Config @key_actors[:vi_command] = Reline::KeyActor::ViCommand.new @history_size = 500 @keyseq_timeout = 500 + @test_mode = false end def reset @@ -75,6 +78,7 @@ class Reline::Config end def read(file = DEFAULT_PATH) + return if @test_mode file = ENV['INPUTRC'] if ENV['INPUTRC'] begin if file.respond_to?(:readlines) |