Repository navigation
Remove terminfo.rb - #769
Conversation
…nment. Reline works perfectly in most major terminal emulators without terminfo. In minor/old terminal emulator, we used to get key bindings from terminfo, but I think it is not used so much.
|
If we should extract this feature to like |
|
Having an optional dependency for a small group of users to adapt reline to their keybindings seems like a great solution. |
|
I think supporting terminfo inside Reline is more maintainable compared to supporting reline-terminfo gem |
st0012
left a comment
There was a problem hiding this comment.
I'm in support for this. Thank you for spending time investigating the usage of it 👍
ima1zumi
left a comment
There was a problem hiding this comment.
LGTM! I tried a quick check with TERM settings in iTerm2, and there were no issues.
non-windows environment. (ruby/reline#769) Reline works perfectly in most major terminal emulators without terminfo. In minor/old terminal emulator, we used to get key bindings from terminfo, but I think it is not used so much. ruby/reline@3ceba3bff7
Brings in recent fixes including ruby/reline#769 which should resolve jruby#8466 by removing all fiddle use. Fixes jruby#8466
Reline uses fiddle to load terminfo from libncurses.
Fiddle and libncurses are not available in some environment. Fiddle will be removed from default gems, so we will going to have more problem loading terminfo.
When Reline is used in most terminal emulator, terminfo has no effect. Reducing dependency is better.
Impact of removing terminfo.rb
It depends on the statistics of environment variable TERM used in real world.
I searched with "export TERM=" in github.
(This does not reflect actual terminal emulator used in real world, but I don't have idea to figure it out)
Out of 46.8k files, these TERM values (146 files) has a different key bindings from key bindings that Reline registers without terminfo.
Detailed result is here https://gist.github.com/tompng/2e19e75234f61e250bafd4c50ec5b7be
Checking with
infocmpcommand,sun,vt52andd210-dgdoes not havecuucudhpacapability that Reline uses. Reline might not work even with terminfo, so exclude them.cons25have differenthpavalue,machandxtermcdoes not havehpa. Perhaps Reline does not work in these environments too.In
TERM=aaa-60|aixterm|cons25|mach|qansi|xtermc, End, PageUP, PageDown, Delete(Not Backspace) won't work. But some keyboard (example: Macbook) does not have these keys in the first place.- - - \e[P\e[146q \e[150q \e[154q \e[P\e[F \e[I \e[G \u007F\e[Y \e[V \e[U \e[9\e[Y \e[V \e[U \e[P\e[Y \e[V \e[U -Other tools
Readline uses terminfo
zshuses terminfo.nodeandipythondoes not seem to use terminfo