Command keys are printed to console

Hi Rails devs and community,

When I am in rails console environment, the irb session will print out command keys as ascii string.

ex. Delete key will show as ^[[3~

How can I change this behavior? Instead I want these keys to execute common actions associated with them eg. Home to begin of line, Delete to delete after, etc.

Local machine:

  • Manjaro 21.2.5
  • XFCE Terminal
  • Ruby 3.0.3 & Rails 7.0.3


I found that when I run irb --singleline, these keyshortcuts work as expected.

To make this permanent across irb sessions and in rails console, I added this line

# in ~/.irbrc
IRB.conf[:USE_SINGLELINE] = true

Note that code completion is missing even with require 'irb/completion'. If anyone knows how to keep this with single line mode please let me know :))