diff --git a/scripts/man/README.md b/scripts/man/README.md index 1b7484a..1b594c1 100644 --- a/scripts/man/README.md +++ b/scripts/man/README.md @@ -8,6 +8,14 @@ 2) Preview ---------- +On Linux: ```shell man -l dub.1 ``` + +On OSX: +```shell +mkdir -p man1 +mv *.1 man1 +man -M . dub +``` diff --git a/scripts/man/gen_man.d b/scripts/man/gen_man.d index d9625be..e1b2089 100755 --- a/scripts/man/gen_man.d +++ b/scripts/man/gen_man.d @@ -73,7 +73,10 @@ { auto manFile = File(config.cwd.buildPath(fileName), "w"); manFile.writeHeader("DUB", config); - auto seeAlso = ["dmd(1)".br, "rdmd(1)"].joiner("\n").to!string; + auto seeAlso = ["dmd(1)", "rdmd(1)"] + .chain(commands.map!(a => a.commands).joiner + .map!(cmd => format("dub-%s(1)", cmd.name))) + .joiner(", ").to!string.bold; scope(exit) manFile.writeFooter(seeAlso, config); alias writeln = (m) => manFile.writeln(m); @@ -146,7 +149,7 @@ auto manFile = File(config.cwd.buildPath(fileName), "w"); auto manName = format("DUB-%s", command.name).toUpper; manFile.writeHeader(manName, config); - static immutable seeAlso = ["dmd(1)".br, "dub(1)"].joiner("\n").to!string; + static immutable seeAlso = ["dmd(1)", "dub(1)"].map!bold.joiner(", ").to!string; scope(exit) manFile.writeFooter(seeAlso, config); alias writeln = (m) => manFile.writeln(m);