Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit db514fe

Browse files
committed
Rename 'count-links' to more descriptive 'count-hard-links'
1 parent a6a4cf3 commit db514fe

8 files changed

Lines changed: 13 additions & 13 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "dua-cli"
3-
version = "2.2.1-alpha.0"
3+
version = "2.3.0"
44
authors = ["Sebastian Thiel <[email protected]>"]
55
edition = "2018"
66
include = ["src/**/*", "Cargo.*"]

src/aggregate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ pub fn aggregate(
3030
match entry {
3131
Ok(entry) => {
3232
let file_size = match entry.metadata {
33-
Some(Ok(ref m)) if !m.is_dir() && (options.count_links || inodes.add(m)) => {
33+
Some(Ok(ref m)) if !m.is_dir() && (options.count_hard_links || inodes.add(m)) => {
3434
if options.apparent_size {
3535
m.len()
3636
} else {

src/common.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ pub struct WalkOptions {
152152
/// for more information.
153153
pub threads: usize,
154154
pub byte_format: ByteFormat,
155-
pub count_links: bool,
155+
pub count_hard_links: bool,
156156
pub apparent_size: bool,
157157
pub color: Color,
158158
pub sorting: TraversalSorting,

src/interactive/app_test/utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ pub fn initialized_app_and_terminal_with_closure<P: AsRef<Path>>(
165165
threads: 1,
166166
byte_format: ByteFormat::Metric,
167167
apparent_size: true,
168-
count_links: false,
168+
count_hard_links: false,
169169
color: Color::None,
170170
sorting: TraversalSorting::AlphabeticalByFileName,
171171
},

src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ fn run() -> Result<(), Error> {
3030
Color::None
3131
},
3232
apparent_size: opt.apparent_size,
33-
count_links: opt.count_links,
33+
count_hard_links: opt.count_hard_links,
3434
sorting: TraversalSorting::None,
3535
};
3636
let res = match opt.command {

src/options.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,16 @@ pub struct Args {
4949
/// GiB - only gibibytes
5050
/// MB - only megabytes
5151
/// MiB - only mebibytes
52-
#[structopt(short = "f", long = "format")]
52+
#[structopt(short = "f", long)]
5353
pub format: Option<ByteFormat>,
5454

5555
/// Display apparent size instead of disk usage.
56-
#[structopt(short = "A", long = "apparent-size")]
56+
#[structopt(short = "A", long)]
5757
pub apparent_size: bool,
5858

5959
/// Count hard-linked files each time they are seen
60-
#[structopt(short = "l", long = "count-links")]
61-
pub count_links: bool,
60+
#[structopt(short = "l", long)]
61+
pub count_hard_links: bool,
6262

6363
/// One or more input files or directories. If unset, we will use all entries in the current working directory.
6464
#[structopt(parse(from_os_str))]
@@ -82,10 +82,10 @@ pub enum Command {
8282
statistics: bool,
8383
/// If set, paths will be printed in their order of occurrence on the command-line.
8484
/// Otherwise they are sorted by their size in bytes, ascending.
85-
#[structopt(long = "no-sort")]
85+
#[structopt(long)]
8686
no_sort: bool,
8787
/// If set, no total column will be computed for multiple inputs
88-
#[structopt(long = "no-total")]
88+
#[structopt(long)]
8989
no_total: bool,
9090
/// One or more input files or directories. If unset, we will use all entries in the current working directory.
9191
#[structopt(parse(from_os_str))]

src/traverse.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ impl Traversal {
9494
entry.file_name
9595
};
9696
let file_size = match entry.metadata {
97-
Some(Ok(ref m)) if !m.is_dir() && (walk_options.count_links || inodes.add(m)) => {
97+
Some(Ok(ref m)) if !m.is_dir() && (walk_options.count_hard_links || inodes.add(m)) => {
9898
if walk_options.apparent_size {
9999
m.len()
100100
} else {

0 commit comments

Comments
 (0)