From 777d5367496bd1e8dad500685c0786a2572fc9e8 Mon Sep 17 00:00:00 2001 From: aycabta Date: Sat, 12 Sep 2020 04:51:08 +0900 Subject: [ruby/reline] Support for word movement escape sequences in iTerm2 https://github.com/ruby/reline/commit/187235f88c --- lib/reline/ansi.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib') diff --git a/lib/reline/ansi.rb b/lib/reline/ansi.rb index 8b6b10cb89..80fccd74f9 100644 --- a/lib/reline/ansi.rb +++ b/lib/reline/ansi.rb @@ -38,6 +38,12 @@ class Reline::ANSI # Del is 0x08 # Arrow keys are the same of KDE + # iTerm2 + [27, 27, 91, 67] => :em_next_word, # Option+→ + [27, 27, 91, 68] => :ed_prev_word, # Option+← + [195, 166] => :em_next_word, # Option+f + [195, 162] => :ed_prev_word, # Option+b + # others [27, 32] => :em_set_mark, # M- [24, 24] => :em_exchange_mark, # C-x C-x TODO also add Windows -- cgit v1.2.3