forked from extern/nushell
table --collapse dont do truncation return message instead (#8172)
Reverts #8042
I've just noticed that #8042 was merged, but I didn't addressed your
@fdncred last comment.
This PR reverts #8042 and returns a message in cases where we need
truncation/wrapping.
157b7e0b60/crates/nu-command/tests/commands/table.rs (L234-L240)
Signed-off-by: Maxim Zhiburt <zhiburt@gmail.com>
This commit is contained in:
@ -231,6 +231,14 @@ fn table_collapse_hearts() {
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn table_collapse_doesnot_support_width_control() {
|
||||
let actual = nu!(
|
||||
r#"[[a]; [11111111111111111111111111111111111111111111111111111111111111111111111111111111]] | table --collapse"#
|
||||
);
|
||||
assert_eq!(actual.out, "Couldn't fit table into 80 columns!");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn table_expand_0() {
|
||||
let actual = nu!(r#"[[a b, c]; [1 2 3] [4 5 [1 2 3]]] | table --expand"#);
|
||||
|
Reference in New Issue
Block a user