Fix the hard code of max depth

This commit is contained in:
Jedsek
2022-08-22 23:58:26 +08:00
committed by andy.boot
parent 81d52e6e3a
commit f60184ecbb
3 changed files with 5 additions and 4 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
use clap::{Arg, Command};
pub(crate) fn build_cli() -> Command<'static> {
pub fn build_cli(max_depth: &str) -> Command {
Command::new("Dust")
.about("Like du but more intuitive")
.version(env!("CARGO_PKG_VERSION"))
@@ -11,7 +11,7 @@ pub(crate) fn build_cli() -> Command<'static> {
.long("depth")
.help("Depth to show")
.takes_value(true)
.default_value("18446744073709551615")
.default_value(max_depth)
)
.arg(
Arg::new("number_of_lines")