Skip to content

Commit

Permalink
Merge pull request #147 from QuarticCat/master
Browse files Browse the repository at this point in the history
Beautify help messages
  • Loading branch information
bootandy committed Jun 8, 2021
2 parents 1872976 + e1ffc92 commit c4a73d5
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 12 deletions.
12 changes: 12 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 5 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,33 +14,32 @@ categories = ["command-line-utilities"]
license = "Apache-2.0"

[badges]
travis-ci = {repository = "https://travis-ci.org/bootandy/dust"}
travis-ci = { repository = "https://travis-ci.org/bootandy/dust" }

[[bin]]
name = "dust"
path = "src/main.rs"

[dependencies]
ansi_term = "0.12"
clap = "=2.33"
clap = { version = "=2.33", features = ["wrap_help"] }
lscolors = "0.7"
num_cpus = "1"
terminal_size = "0.1"
unicode-width = "0.1"
ignore="0.4"
ignore = "0.4"
crossbeam-channel = "0.5"
walkdir="2.3"
walkdir = "2.3"
thousands = "0.2"
stfu8 = "0.2"

[target.'cfg(windows)'.dependencies]
winapi-util = "0.1"

[dev-dependencies]
assert_cmd ="1"
assert_cmd = "1"
tempfile = "=3"


[[test]]
name = "integration"
path = "tests/tests.rs"
8 changes: 2 additions & 6 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ fn main() {
.short("d")
.long("depth")
.help("Depth to show")
.takes_value(true),
.takes_value(true)
.conflicts_with("number_of_lines"),
)
.arg(
Arg::with_name("number_of_lines")
Expand Down Expand Up @@ -150,7 +151,6 @@ fn main() {
.number_of_values(1)
.help("Specify width of output overriding the auto detection of terminal width"),
)

.arg(Arg::with_name("inputs").multiple(true))
.get_matches();

Expand Down Expand Up @@ -181,10 +181,6 @@ fn main() {
.map_err(|_| eprintln!("Ignoring bad value for depth"))
.ok()
});
if options.is_present("depth") && number_of_lines != default_height {
eprintln!("Use either -n or -d. Not both");
return;
}

let no_colors = init_color(options.is_present("no_colors"));
let use_apparent_size = options.is_present("display_apparent_size");
Expand Down

0 comments on commit c4a73d5

Please sign in to comment.