forked from extern/nushell
Don't emit a newline in autoview. (#1466)
The extra newline character makes it hard to use nu as part of an external processing pipeline, since the extra character could taint the results. For example: ``` $ nu -c 'echo test | xxd' 00000000: 7465 7374 test ``` versus ``` nu -c 'echo test' | xxd 00000000: 7465 7374 0a test. ```
This commit is contained in:
@ -3,6 +3,15 @@
|
||||
/// Note: this exists to differentiate between intentional writing to stdout
|
||||
/// and stray printlns left by accident
|
||||
#[macro_export]
|
||||
macro_rules! out {
|
||||
($($tokens:tt)*) => { print!($($tokens)*) }
|
||||
}
|
||||
|
||||
/// Outputs to standard out with a newline added
|
||||
///
|
||||
/// Note: this exists to differentiate between intentional writing to stdout
|
||||
/// and stray printlns left by accident
|
||||
#[macro_export]
|
||||
macro_rules! outln {
|
||||
($($tokens:tt)*) => { println!($($tokens)*) }
|
||||
}
|
||||
|
Reference in New Issue
Block a user