mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-20 23:04:12 +08:00
escape_string_script: Escape DEL as \x7f
This used to print a literal DEL character in the output for `bind`, which wouldn't actually show up and made it hard to figure out what the key was. So we just escape it back to how we actually used it - `\x7f`. Fixes #7631.
This commit is contained in:
parent
a4f5dd5054
commit
932074f06c
@ -953,6 +953,14 @@ static void escape_string_script(const wchar_t *orig_in, size_t in_len, wcstring
|
||||
need_escape = need_complex_escape = true;
|
||||
break;
|
||||
}
|
||||
case L'\x7F': {
|
||||
out += L'\\';
|
||||
out += L'x';
|
||||
out += L'7';
|
||||
out += L'f';
|
||||
need_escape = need_complex_escape = true;
|
||||
break;
|
||||
}
|
||||
case L'\\':
|
||||
case L'\'': {
|
||||
need_escape = need_complex_escape = true;
|
||||
|
@ -710,3 +710,6 @@ end
|
||||
# CHECKERR: checks/string.fish (line {{\d+}}): function: The name 'string' is reserved, and cannot be used as a function name
|
||||
# CHECKERR: function string
|
||||
# CHECKERR: ^
|
||||
|
||||
string escape \x7F
|
||||
# CHECK: \x7f
|
||||
|
Loading…
x
Reference in New Issue
Block a user