Expected behavior: Keyboard shortcuts using readline shortcuts like this answer.
What actually happens: Ctrl+l
is pressed to clear the screen
irb
2023-08-08 20:31:17 -0600
Loaded Profile methods
irb.main{
irb.m${ ^Ltyping stuff^E^A
ruby version: ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x86_64-linux]
I thought my ~/.irbrc
may have been disrupting shortcuts, inadvertently. I've renamed it so it isn't sourced but the behavior remains the same irb writes "^#{letter_I_pressed}" to screen instead of readline behaviors.
I noticed <esc>
enables Ctrl-l
to clear and some vi-like behavior (0 moves to beginning of line, Shift-c
does nothing).
So, maybe setting my bash modes to vi is breaking this?
in my /etc/profile I have:
set -o vi
set editing-mode vi
set keymap vi
set show-mode-in-prompt on
so I tried:
set -o emacs ; set editing-mode emacs ; set keymap emacs ; irb
Oddly, this does not enable emacs like readline behavior, nor does it change what I've described above.