Skip to content

Commit

Permalink
allow space in config value
Browse files Browse the repository at this point in the history
fix #657
  • Loading branch information
monkeyWzr authored May 15, 2024
1 parent b9b3d39 commit 06a8911
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/reline/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion test/reline/test_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down

0 comments on commit 06a8911

Please sign in to comment.