-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ExternalPrinter can't handle ASCII control character #692
Comments
Raw mode is activated only while reading / |
Same behavior with linefeed: diff --git a/examples/demo.rs b/examples/demo.rs
index a7ad87c..4754cac 100644
--- a/examples/demo.rs
+++ b/examples/demo.rs
@@ -90,8 +90,8 @@ fn main() -> io::Result<()> {
let mut rng = thread_rng();
let mut i = 0usize;
loop {
- writeln!(iface, "[#{}] Concurrent message #{}",
- my_thread_id, i).unwrap();
+ writeln!(iface, "test\x08\x08\x08",
+ ).unwrap();
let wait_ms = rng.gen_range(1, 500);
thread::sleep(Duration::from_millis(wait_ms));
i += 1; linefeed % cargo run --example demo
demo> spawn-log-thread
Spawning log thread #0
test
test
test
test
test
demo>
Goodbye. But if I add one character like "test\x08\x08\x08!" |
do we have any plan to add the feature that enable ASCII control character in external printer? |
To print plain or styled text |
tested with this bash script: test.txt is just one line: yield (as rustyline): |
I am using rustyline version 11.0.0
I want use ExternalPrinter to print string that contains some ASCII control character
if I write the following code, it output a single character
t
. this make since because\x08
is a backspace.but if I instead using the following code, ExternalPrintetr output all four character
test
.and I expect it output just a
t
why ASCII control character didn't work in ExternalPrinter that I use it in another thread?
and how can I make ExternalPrinter handle ASCII control character?
The text was updated successfully, but these errors were encountered: