Enable wrapping help in clap

This commit is contained in:
Oscar Bonilla 2023-08-22 21:30:02 -07:00
parent 2109a7b488
commit 31f71f29bf
3 changed files with 49 additions and 6 deletions

50
Cargo.lock generated
View file

@ -352,6 +352,7 @@ dependencies = [
"anstyle",
"clap_lex",
"strsim",
"terminal_size",
]
[[package]]
@ -929,6 +930,17 @@ dependencies = [
"cfg-if",
]
[[package]]
name = "io-lifetimes"
version = "1.0.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2"
dependencies = [
"hermit-abi",
"libc",
"windows-sys 0.48.0",
]
[[package]]
name = "iovec"
version = "0.1.4"
@ -945,7 +957,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b"
dependencies = [
"hermit-abi",
"rustix",
"rustix 0.38.8",
"windows-sys 0.48.0",
]
@ -1047,7 +1059,7 @@ dependencies = [
"rand_chacha",
"rayon",
"regex",
"rustix",
"rustix 0.38.8",
"serde",
"serde_json",
"smallvec",
@ -1140,6 +1152,12 @@ version = "0.5.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f"
[[package]]
name = "linux-raw-sys"
version = "0.3.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519"
[[package]]
name = "linux-raw-sys"
version = "0.4.5"
@ -1758,6 +1776,20 @@ version = "0.1.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76"
[[package]]
name = "rustix"
version = "0.37.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4d69718bf81c6127a49dc64e44a742e8bb9213c0ff8869a22c308f84c1d4ab06"
dependencies = [
"bitflags 1.3.2",
"errno",
"io-lifetimes",
"libc",
"linux-raw-sys 0.3.8",
"windows-sys 0.48.0",
]
[[package]]
name = "rustix"
version = "0.38.8"
@ -1767,7 +1799,7 @@ dependencies = [
"bitflags 2.3.3",
"errno",
"libc",
"linux-raw-sys",
"linux-raw-sys 0.4.5",
"windows-sys 0.48.0",
]
@ -1984,7 +2016,17 @@ dependencies = [
"cfg-if",
"fastrand",
"redox_syscall 0.3.5",
"rustix",
"rustix 0.38.8",
"windows-sys 0.48.0",
]
[[package]]
name = "terminal_size"
version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e6bf6f19e9f8ed8d4048dc22981458ebcf406d67e94cd422e5ecd73d63b3237"
dependencies = [
"rustix 0.37.23",
"windows-sys 0.48.0",
]

View file

@ -25,7 +25,7 @@ blake2 = "0.10.6"
byteorder = "1.4.3"
bytes = "1.4.0"
cargo_metadata = "0.17.0"
clap = { version = "4.3.23", features = ["derive", "deprecated"] }
clap = { version = "4.3.23", features = ["derive", "deprecated", "wrap_help"] }
clap_complete = "4.3.2"
clap_mangen = "0.2.10"
chrono = { version = "0.4.26", default-features = false, features = [

View file

@ -417,7 +417,8 @@ fn test_help() {
Usage: jj diffedit [OPTIONS]
Options:
-r, --revision <REVISION> The revision to touch up. Defaults to @ if neither --to nor --from are specified
-r, --revision <REVISION> The revision to touch up. Defaults to @ if neither --to nor --from are
specified
--from <FROM> Show changes from this revision. Defaults to @ if --to is specified
--to <TO> Edit changes in this revision. Defaults to @ if --from is specified
-h, --help Print help (see more with '--help')