depot/pkgs/by-name/ch/chawan/mancha-augment-path.diff
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00: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: