fish_key_reader: stop emitting \b for ctrl-h

This is just too confusing; \b sounds like it would map backspace but it's
actually just ctrl-h.  Backspace is a different key ("bind backspace"),
so let's move away from \b.

Reproduce by typing ctrl-h in fish_key_reader, or, for even more confusion,
use a terminal like tmux and type ctrl-backspace which also sends ctrl-h.

I've thought about changing \b (and its aliases like \ch and \x08) to mean
backspace but that seems like unnecessary breakage, since they all already
mean ctrl-h, and can usually be mapped independent of backspace.

See the discussion in #10738
This commit is contained in:
Johannes Altmanninger 2024-09-23 19:51:20 +02:00
parent 2e9de57fd7
commit 4336f9df7f

View file

@ -420,7 +420,6 @@ fn ctrl_to_symbol(buf: &mut WString, c: char) {
let c = u8::try_from(c).unwrap();
let symbolic_name = match c {
8 => L!("\\b"),
9 => L!("\\t"),
10 => L!("\\n"),
13 => L!("\\r"),