Skip to content

Commit

Permalink
Renamed --no-sort flag to --unsorted + updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
Bdeering1 committed Jun 26, 2023
1 parent 6111b13 commit 6f23b94
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Press *q* or *esc* to exit.
| -v, --verbose | Verbose output |
| -n, --no-git | Include projects not tracked by git |
| -s, --skip-empty | Hide projects with zero possible disk savings |
| -u, --unsorted | Don't sort projects |
| -h, --help | Print help |
| -V, --version | Print version |

Expand Down
8 changes: 4 additions & 4 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ pub struct PolykillArgs {
#[arg(short, long)]
pub no_git: bool,

/// Don't perform sorting (results will appear in the order searched)
#[arg(long)]
pub no_sort: bool,
/// Don't sort projects
#[arg(short, long)]
pub unsorted: bool,

/// Hide projects with zero possible disk savings
#[arg(short, long)]
Expand Down Expand Up @@ -82,7 +82,7 @@ fn main() {
return;
}

if !args.no_sort {
if !args.unsorted {
projects.sort_by_key(|p| Reverse(p.rm_size));
projects.sort_by_key(|p| p.project_type);
}
Expand Down

0 comments on commit 6f23b94

Please sign in to comment.