depot/third_party/nixpkgs/pkgs/by-name/ch/chawan/mancha-augment-path.diff
Default email f34ce41345 Project import generated by Copybara.
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
2024-07-27 08:49:29 +02:00

13 lines
659 B
Diff

Add the -m option to man's command line to augment the list of paths searched by man.
The required -m option is only available in the mandoc implementation.
--- a/adapter/protocol/man.nim
+++ b/adapter/protocol/man.nim
@@ -264,7 +264,7 @@ proc myOpen(cmd: string): tuple[ofile, efile: File] =
proc doMan(man, keyword, section: string) =
let sectionOpt = if section == "": "" else: ' ' & quoteShellPosix(section)
let cmd = "MANCOLOR=1 GROFF_NO_SGR=1 MAN_KEEP_FORMATTING=1 " &
- man & sectionOpt & ' ' & quoteShellPosix(keyword)
+ man & sectionOpt & " -m @out@ " & quoteShellPosix(keyword)
let (ofile, efile) = myOpen(cmd)
if ofile == nil: