Conversation
# Conflicts: # src/tty/unix.rs
`read_to_string` cannot be used (read until EOF).
While searching history. While listing completion candidates.
|
https://github.com/ghc/ghc/blob/master/libraries/base/cbits/inputReady.c#L325
|
Replace `unwrap` panic by error. Merge all decoding errors into IO error.
# Conflicts: # src/tty/test.rs # src/tty/unix.rs # src/tty/windows.rs
# Conflicts: # src/tty/test.rs # src/tty/unix.rs # src/tty/windows.rs
Sorry forgot to add this. I tested on a x86 Linux and Mac. |
|
I will try to have a look this week-end. |
# Conflicts: # src/tty/unix.rs # src/tty/windows.rs
TODO Fix, update windows code accordingly
|
@gwenn Thanks for the update. I tried your patches and the issue is gone. In my software I have a (hacky) |
You should be able to implement an |
|
@gwenn My idea is to do something like impl<T> std::io::Write for T where T: ExternalPrinter {
...
}The prints are some via the let out = if interactive {
Box::new(rl.create_external_printer()?) as Box<dyn std::io::Write>
} else {
Box::new(std::io::stdout()) as Box<dyn std::io::Write>
}
writeln!(out, "test"); |
|
The |
|
Is there any chance this PR could be landed? We use EDIT: Actually not a huge priority, we're gonna experiment with different crate for this purpose https://docs.rs/reedline |
Current implementation is incomplete on windows.
|
# Conflicts: # src/tty/test.rs # src/tty/unix.rs # src/tty/windows.rs
# Conflicts: # src/tty/windows.rs
Can UNIX-only implementation land first then? Shall an updated, but limited scope pull request (with |
|
Could you please give it another try (windows implementation should be fine now) ? |
See #229
To do:
Windows platform (only one printer supported, and when the printer is dropped we still wait)