1
0
mirror of https://github.com/sharkdp/bat synced 2026-08-08 19:41:45 +00:00

refactor: Port to clap3

Ths does remove the specialization of version's description.  The way
this is done (internally through `mut_arg`) doesn't play well with
subcommands.  Clap tries to force this version of `version` into the
subcommand despite not being needed.  Clap v4 dramatically changes how
version customization works.

clap also does more error checks now to prevent programmer mistake, so
we can't have a conflict with an argument that is conditionally there,
so I swapped the condition.
This commit is contained in:
Ed Page
2022-09-01 15:41:07 -05:00
committed by David Peter
parent 49875d6ce7
commit 2323804f7e
5 changed files with 61 additions and 56 deletions
+3 -3
View File
@@ -77,10 +77,10 @@ default-features = false
features = ["parsing"]
[dependencies.clap]
version = "2.34"
version = "3.2.20"
optional = true
default-features = false
features = ["suggestions", "color", "wrap_help"]
features = ["std", "suggestions", "color", "wrap_help", "cargo"]
[dev-dependencies]
assert_cmd = "2.0.4"
@@ -93,7 +93,7 @@ tempfile = "3.3.0"
nix = { version = "0.24.2", default-features = false, features = ["term"] }
[build-dependencies]
clap = { version = "2.34", optional = true }
clap = { version = "3.2.20", optional = true }
[profile.release]
lto = true