With rlwrap cat
or rlwrap bash
I can use keybinding "jk" to exit from insert mode.
This does not work with rlwrap ghci
. Why?
rlwrap's not very useful with programs which already do (even rudimentary) line-editing. According to its readme:
Commands that already use readline will always ask for (and get) single keypresses, which makes rlwrapping them rather pointless. However, if one uses the -a option, rlwrap will use its own line editing and history. Unforunately, in this case, rlwrap cannot detect whether asks for a password. This can be remedied by giving the password prompt (excluding trailing space and possibly the first few letters) as an argument to the -a option.
You might get some use out of rlwrap using the -a
option, as suggested. The first sentence is a little too specific (other programs can ask for "single keypresses" than those using readline).
rlwrap
without the-a
option is pointless, but the programs that always ask for single keypresses. You are right thatreadline
is not the only input method that does so (editline, JLine and thezsh
line editor are other examples). I'll make that clearer in the manpage. – Hans Lub Jul 01 '18 at 15:04