Reputation: 5492
I just hate it so much when small things that were working since forever suddenly break.
I use MINGW64 bash
in Windows Terminal in Windows 10. When I run gdb-multiarch
, inside it, suddenly Backspace deletes the whole line; however Ctrl+Backspace deletes only a single character ?! Inside bash
, Backspace deletes a single character, Ctrl+Backspace also deletes a single character.
My question is: how do I get back to gdb-multiarch
deleting only a single character upon pressing backspace?
Versions:
cmd //c ver
): Microsoft Windows [Version 10.0.19045.5555])$ bash --version | head -1
GNU bash, version 5.2.37(2)-release (x86_64-pc-cygwin)
$ gdb-multiarch --version | head -1
GNU gdb (GDB) 16.2
$ ls -la ~/.inputrc /etc/inputrc
-rw-r--r-- 1 user None 2.8K Aug 19 2024 /etc/inputrc
-rw-r--r-- 1 user None 3.2K Apr 19 2018 /home/user/.inputrc
I have found that keyboard behavior in gdb is controlled by inputrc files: https://sourceware.org/gdb/current/onlinedocs/gdb.html/Readline-Init-File.html ; in my case /etc/inputrc
is newer, but I really cannot tell which one is being read by gdb (although webpage mentions ~/.inputrc
takes priority) - I tried strace gdb-multiarch | grep input
, nothing gets output.
Questions like Vim Conque Gdb backspace deletes whole word mention that it has to do with some "kill" commands in inputrc, so I tried this:
$ grep -r '\\C\|kill' ~/.inputrc /etc/inputrc
/home/user/.inputrc:# equivalent to "\C-?": delete-char
/home/user/.inputrc: "\C-?": backward-kill-line # Ctrl-BackSpace
So Ctrl-BackSpace should delete a whole line, but in gdb
it is opposite (i.e. BackSpace deletes a whole line, Ctrl-BackSpace deletes a character), and in bash
Ctrl-BackSpace as per above specification does not work (i.e. deletes a single character, not a line)?!
What is going on here, how do I fix this - or if not, to whom do I submit a bug?
Upvotes: 0
Views: 21