Continuing on anchoring and improvements on Nu's overall internal commands (#2635). `move column` sub command has been turned into the command `move` since we use it to move exclusively columns. Examples added as well. Fixed it to carry along any anchor locations that might be in place if table to be moved originates from other sources.
36 lines
986 B
Rust
36 lines
986 B
Rust
/// Outputs to standard out
|
|
///
|
|
/// 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)*) }
|
|
}
|
|
|
|
/// Outputs to standard error
|
|
///
|
|
/// Note: this exists to differentiate between intentional writing to stdout
|
|
/// and stray printlns left by accident
|
|
#[macro_export]
|
|
macro_rules! errln {
|
|
($($tokens:tt)*) => { eprintln!($($tokens)*) }
|
|
}
|
|
|
|
#[macro_export]
|
|
macro_rules! row {
|
|
($( $key: expr => $val: expr ),*) => {{
|
|
let mut map = ::indexmap::IndexMap::new();
|
|
$( map.insert($key, $val); )*
|
|
::nu_protocol::UntaggedValue::row(map).into_untagged_value()
|
|
}}
|
|
}
|