diff options
author | aycabta <[email protected]> | 2021-12-24 20:06:48 +0900 |
---|---|---|
committer | git <[email protected]> | 2021-12-25 00:32:57 +0900 |
commit | b0db420b0e70753986d42579439acdd7ff0d9e95 (patch) | |
tree | d55f5934cac635dc01ac3297986575ac8954de0b /lib/reline/line_editor.rb | |
parent | 22cc2243f92ef09c10534412511a02ca8ccd45cb (diff) |
[ruby/reline] Escape newline(s) in prompt
https://github.com/ruby/reline/commit/b545459fca
Diffstat (limited to 'lib/reline/line_editor.rb')
-rw-r--r-- | lib/reline/line_editor.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/reline/line_editor.rb b/lib/reline/line_editor.rb index ff5d160e64..5968af708b 100644 --- a/lib/reline/line_editor.rb +++ b/lib/reline/line_editor.rb @@ -260,7 +260,7 @@ class Reline::LineEditor end def reset_variables(prompt = '', encoding:) - @prompt = prompt + @prompt = prompt.gsub("\n", "\\n") @mark_pointer = nil @encoding = encoding @is_multiline = false |