diff --git a/lib/reline/config.rb b/lib/reline/config.rb index d44c2675ab..386fa95e37 100644 --- a/lib/reline/config.rb +++ b/lib/reline/config.rb @@ -182,7 +182,7 @@ def read_lines(lines, file = nil) next if if_stack.any? { |_no, skip| skip } case line - when /^set +([^ ]+) +([^ ]+)/i + when /^set +([^ ]+) +(.+)/i var, value = $1.downcase, $2 bind_variable(var, value) next diff --git a/test/reline/test_config.rb b/test/reline/test_config.rb index 6068292847..a1531d6ab1 100644 --- a/test/reline/test_config.rb +++ b/test/reline/test_config.rb @@ -388,7 +388,8 @@ def test_additional_key_bindings_for_other_keymap "cd": "CD" set keymap emacs "ef": "EF" - set editing-mode vi # keymap changes to be vi-insert + # keymap changes to be vi-insert + set editing-mode vi LINES expected = { 'cd'.bytes => 'CD'.bytes }