Remove unnecessary escaping for # and ~ inside key name tokens

While at it, don't escape "?", I don't know why 68e167d576 (f-k-r should
use the user's locale, 2016-06-29) did that. Question mark is only special
in combination with redirections.
This commit is contained in:
Johannes Altmanninger
2025-04-01 22:59:36 +02:00
parent 892c970bfa
commit daa692a20b
5 changed files with 32 additions and 19 deletions

View File

@@ -377,7 +377,7 @@ fn readb(in_fd: RawFd, blocking: bool) -> ReadbResult {
return ReadbResult::Eof;
}
let c = arr[0];
FLOG!(reader, "Read byte", char_to_symbol(char::from(c)));
FLOG!(reader, "Read byte", char_to_symbol(char::from(c), true));
// The common path is to return a u8.
return ReadbResult::Byte(c);
}
@@ -1646,7 +1646,7 @@ fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
if i != 0 {
write!(f, " ")?;
}
write!(f, "{}", char_to_symbol(char::from(c)))?;
write!(f, "{}", char_to_symbol(char::from(c), i == 0))?;
}
Ok(())
}