diff options
author | aycabta <aycabta@gmail.com> | 2021-09-20 23:44:01 +0900 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2021-09-25 00:11:44 +0900 |
commit | f726c79d7489c09615b37f74eb747cf64876a643 (patch) | |
tree | d69e464cfd1a3963c8ed1c9f02a66c2348a86432 /lib/reline/line_editor.rb | |
parent | ff26c60bc137b6be96c7f49241b831b037a157b3 (diff) | |
download | ruby-f726c79d7489c09615b37f74eb747cf64876a643.tar.gz |
[ruby/reline] Add aliases {prev,next}_history to ed_{prev,next}_history
https://github.com/ruby/reline/commit/d740e18cff
Diffstat (limited to 'lib/reline/line_editor.rb')
-rw-r--r-- | lib/reline/line_editor.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/reline/line_editor.rb b/lib/reline/line_editor.rb index 65551035b7..c7d6ff4447 100644 --- a/lib/reline/line_editor.rb +++ b/lib/reline/line_editor.rb @@ -2409,6 +2409,7 @@ class Reline::LineEditor arg -= 1 ed_prev_history(key, arg: arg) if arg > 0 end + alias_method :previous_history, :ed_prev_history private def ed_next_history(key, arg: 1) if @is_multiline and @line_index < (@buffer_of_lines.size - 1) @@ -2456,6 +2457,7 @@ class Reline::LineEditor arg -= 1 ed_next_history(key, arg: arg) if arg > 0 end + alias_method :next_history, :ed_next_history private def ed_newline(key) process_insert(force: true) |