diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2021-10-06 13:01:18 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2021-10-06 13:01:18 +0200 |
commit | 08aa7daee0b21049cd4aa75f2af14ddf46497cbd (patch) | |
tree | f63fffd52d4b6471fd8d98c448a11ffe908084bd /doc/manual/generate-manpage.nix | |
parent | d12bf8eff0e8c8f4197671f67b5c8117108e3769 (diff) |
Remove links to .md files in help output
Fixes #5337.
Diffstat (limited to 'doc/manual/generate-manpage.nix')
-rw-r--r-- | doc/manual/generate-manpage.nix | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/doc/manual/generate-manpage.nix b/doc/manual/generate-manpage.nix index 4fc9abea1..244cfa0c2 100644 --- a/doc/manual/generate-manpage.nix +++ b/doc/manual/generate-manpage.nix @@ -1,4 +1,4 @@ -command: +{ command, renderLinks ? false }: with builtins; with import ./utils.nix; @@ -20,7 +20,11 @@ let categories = sort (x: y: x.id < y.id) (unique (map (cmd: cmd.category) (attrValues def.commands))); listCommands = cmds: concatStrings (map (name: - "* [`${command} ${name}`](./${appendName filename name}.md) - ${cmds.${name}.description}\n") + "* " + + (if renderLinks + then "[`${command} ${name}`](./${appendName filename name}.md)" + else "`${command} ${name}`") + + " - ${cmds.${name}.description}\n") (attrNames cmds)); in "where *subcommand* is one of the following:\n\n" |