diff options
author | aycabta <aycabta@gmail.com> | 2019-05-20 04:47:43 +0900 |
---|---|---|
committer | aycabta <aycabta@gmail.com> | 2019-05-20 04:47:58 +0900 |
commit | 075e1acb4c920edf0b5d20a5cb5004a4f88fbcd8 (patch) | |
tree | 787e7e200794ba79628426493804c26bd0b08455 | |
parent | 4d7ada10b1d8d6eba79d845aa9ecffb890f593d4 (diff) |
Readline.completion_proc accepts US-ASCII
-rw-r--r-- | lib/reline/line_editor.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/reline/line_editor.rb b/lib/reline/line_editor.rb index 1362048e35..09ac94fa39 100644 --- a/lib/reline/line_editor.rb +++ b/lib/reline/line_editor.rb @@ -406,7 +406,9 @@ class Reline::LineEditor private def complete_internal_proc(list, is_menu) preposing, target, postposing = @retrieve_completion_block.(@line, @byte_pointer) list = list.select { |i| - raise Encoding::CompatibilityError if i and i.encoding != @encoding + if i and i.encoding != Encoding::US_ASCII and i.encoding != @encoding + raise Encoding::CompatibilityError + end i&.start_with?(target) } if is_menu |