Skip to content

Commit a4be2d2

Browse files
authored
Merge pull request #72 from denysvitali/feature/improve-display
Improve display
2 parents 6a646ab + 905d603 commit a4be2d2

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/input.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ pub struct Cli {
3434
pub long: bool,
3535

3636
/// Formats the time output
37-
#[structopt(long = "time-format", default_value = "%e %b %T")]
37+
#[structopt(long = "time-format", default_value = "%e %b %H.%M")]
3838
pub time_format: String,
3939

4040
/// Shows the file created time instead of the file modified time

src/main.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ impl Directory {
255255
.unwrap()
256256
)
257257
}),
258-
DirSortType::Size => sort_as(&mut self.paths, |a, b| {
258+
DirSortType::Size => sort_as(&mut self.paths, |a, b| {
259259
a.path
260260
.symlink_metadata()
261261
.unwrap()
@@ -266,7 +266,7 @@ impl Directory {
266266
.size()
267267
)
268268
}),
269-
DirSortType::Not => (),
269+
DirSortType::Not => (),
270270
}
271271
}
272272

@@ -299,15 +299,15 @@ impl Directory {
299299
let uhold = self.paths[p].user.to_owned();
300300
let shold = self.paths[p].size.to_owned();
301301
let mut gwidth = String::new();
302-
for _ in 0..(gs - ghold.len()) {
303-
gwidth.push(' ')
302+
for _ in 0..(gs - ghold.len() + 1) {
303+
gwidth.push(' ');
304304
}
305305
let mut uwidth = String::new();
306-
for _ in 0..(us - uhold.len()) {
306+
for _ in 0..(us - uhold.len() + 1) {
307307
uwidth.push(' ')
308308
}
309309
let mut swidth = String::new();
310-
for _ in 0..(ss - shold.len()) {
310+
for _ in 0..(ss - shold.len() + 1) {
311311
swidth.push(' ')
312312
}
313313
self.paths[p].group = format!("{}{}", ghold, gwidth);

0 commit comments

Comments
 (0)