Add man page generation via clap_mangen

Add --gen-man-page flag that renders a man page to stdout. Build-time
generation is also supported via the MAN_PATH env var, mirroring the
existing COMPLETION_PATH pattern.
This commit is contained in:
Lam Chau
2026-03-11 00:13:02 -07:00
parent 2ad10e14cb
commit 6eaabed816
5 changed files with 44 additions and 0 deletions
+2
View File
@@ -38,6 +38,7 @@ anyhow = "1.0"
byte-unit = "5.2"
clap = {version = "4.4", features = ["derive"]}
clap_complete = "4.4"
clap_mangen = "0.2"
console = "0.16.2"
chrono = {version = "0.4.44", default-features = false, features = ["clock"]}
directories = "6.0.0"
@@ -57,6 +58,7 @@ unicode-width = "0.2"
anyhow = "1.0"
clap = {version = "4.4", features = ["derive"]}
clap_complete = "4.4"
clap_mangen = "0.2"
[target.'cfg(any(target_os = "linux", target_os = "android"))'.dependencies]
pager = "0.16.1"