Skip to content

Commit

Permalink
Merge pull request #72 from denysvitali/feature/improve-display
Browse files Browse the repository at this point in the history
Improve display
  • Loading branch information
willdoescode authored Mar 14, 2021
2 parents 6a646ab + 905d603 commit a4be2d2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pub struct Cli {
pub long: bool,

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

/// Shows the file created time instead of the file modified time
Expand Down
12 changes: 6 additions & 6 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ impl Directory {
.unwrap()
)
}),
DirSortType::Size => sort_as(&mut self.paths, |a, b| {
DirSortType::Size => sort_as(&mut self.paths, |a, b| {
a.path
.symlink_metadata()
.unwrap()
Expand All @@ -266,7 +266,7 @@ impl Directory {
.size()
)
}),
DirSortType::Not => (),
DirSortType::Not => (),
}
}

Expand Down Expand Up @@ -299,15 +299,15 @@ impl Directory {
let uhold = self.paths[p].user.to_owned();
let shold = self.paths[p].size.to_owned();
let mut gwidth = String::new();
for _ in 0..(gs - ghold.len()) {
gwidth.push(' ')
for _ in 0..(gs - ghold.len() + 1) {
gwidth.push(' ');
}
let mut uwidth = String::new();
for _ in 0..(us - uhold.len()) {
for _ in 0..(us - uhold.len() + 1) {
uwidth.push(' ')
}
let mut swidth = String::new();
for _ in 0..(ss - shold.len()) {
for _ in 0..(ss - shold.len() + 1) {
swidth.push(' ')
}
self.paths[p].group = format!("{}{}", ghold, gwidth);
Expand Down

0 comments on commit a4be2d2

Please sign in to comment.