mirror of
https://github.com/nushell/nushell
synced 2025-01-28 04:45:18 +00:00
Align bytes values in tables
This commit is contained in:
parent
cd1e16d574
commit
12cedddd68
1 changed files with 3 additions and 3 deletions
|
@ -94,14 +94,14 @@ impl Primitive {
|
||||||
let byte = byte_unit::Byte::from_bytes(*b as u128);
|
let byte = byte_unit::Byte::from_bytes(*b as u128);
|
||||||
|
|
||||||
if byte.get_bytes() == 0u128 {
|
if byte.get_bytes() == 0u128 {
|
||||||
return "<empty>".to_string();
|
return " – ".to_string();
|
||||||
}
|
}
|
||||||
|
|
||||||
let byte = byte.get_appropriate_unit(false);
|
let byte = byte.get_appropriate_unit(false);
|
||||||
|
|
||||||
match byte.get_unit() {
|
match byte.get_unit() {
|
||||||
byte_unit::ByteUnit::B => format!("{}", byte.format(0)),
|
byte_unit::ByteUnit::B => format!("{:>5} B ", byte.get_value()),
|
||||||
_ => format!("{}", byte.format(1)),
|
_ => format!("{:>8}", byte.format(1)),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Primitive::Int(i) => format!("{}", i),
|
Primitive::Int(i) => format!("{}", i),
|
||||||
|
|
Loading…
Reference in a new issue