mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
Remove unnecessary trailing space when using the comma format (-m)
unnecessary trailing space was being added. because we were padding for alignment, which is not required with -m fixes #3608 Signed-off-by: anastygnome <noreplygitemail@protonmail.com>
This commit is contained in:
parent
b242e6592c
commit
8693eaa3b9
1 changed files with 6 additions and 1 deletions
|
@ -1874,7 +1874,12 @@ fn display_additional_leading_info(
|
|||
} else {
|
||||
"?".to_owned()
|
||||
};
|
||||
write!(result, "{} ", pad_left(&s, padding.block_size)).unwrap();
|
||||
// extra space is insert to align the sizes, as needed for all formats, except for the comma format.
|
||||
if config.format == Format::Commas {
|
||||
write!(result, "{} ", s).unwrap();
|
||||
} else {
|
||||
write!(result, "{} ", pad_left(&s, padding.block_size)).unwrap();
|
||||
};
|
||||
}
|
||||
Ok(result)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue