1
0
mirror of https://github.com/nushell/nushell.git synced 2025-04-24 05:08:29 +02:00

Flush out! lines, helps autoview ()

This commit is contained in:
Jonathan Turner 2021-01-20 07:23:37 +13:00 committed by GitHub
parent 899d324a9c
commit 2e6d836dd1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,7 +4,11 @@
/// and stray printlns left by accident
#[macro_export]
macro_rules! out {
($($tokens:tt)*) => { print!($($tokens)*) }
($($tokens:tt)*) => {
use std::io::Write;
print!($($tokens)*);
let _ = std::io::stdout().flush();
}
}
/// Outputs to standard out with a newline added