From 7392083c2ffa2dc5449ec0aa529f4a792fb1d2b4 Mon Sep 17 00:00:00 2001 From: aycabta Date: Mon, 6 Jan 2020 21:50:48 +0900 Subject: Support history-size in .inputrc correctly --- lib/reline/config.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lib') 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 -- cgit v1.2.3