13 lines
659 B
Diff
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:
|