diff options
author | aycabta <aycabta@gmail.com> | 2020-01-06 21:50:48 +0900 |
---|---|---|
committer | aycabta <aycabta@gmail.com> | 2020-01-06 21:50:48 +0900 |
commit | 7392083c2ffa2dc5449ec0aa529f4a792fb1d2b4 (patch) | |
tree | 67de4362c9cbf63efc70a00e56f2aa7ba77fe867 /lib | |
parent | e44e3716d01993b4f83af212ab33dce94f4207c9 (diff) | |
download | ruby-7392083c2ffa2dc5449ec0aa529f4a792fb1d2b4.tar.gz |
Support history-size in .inputrc correctly
Diffstat (limited to 'lib')
-rw-r--r-- | lib/reline/config.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/reline/config.rb b/lib/reline/config.rb index fdc2b39c1b..61708f96a7 100644 --- a/lib/reline/config.rb +++ b/lib/reline/config.rb @@ -184,9 +184,8 @@ class Reline::Config def bind_variable(name, value) case name - when *VARIABLE_NAMES then - variable_name = :"@#{name.tr(?-, ?_)}" - instance_variable_set(variable_name, value.nil? || value == '1' || value == 'on') + when 'history-size' + @history_size = value.to_i when 'bell-style' @bell_style = case value @@ -225,6 +224,9 @@ class Reline::Config end when 'keyseq-timeout' @keyseq_timeout = value.to_i + when *VARIABLE_NAMES then + variable_name = :"@#{name.tr(?-, ?_)}" + instance_variable_set(variable_name, value.nil? || value == '1' || value == 'on') end end |