mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 14:06:16 +02:00
Put examples first in the manpages
This commit is contained in:
parent
72428e38d9
commit
e2efc63979
1 changed files with 6 additions and 5 deletions
|
@ -20,6 +20,11 @@ let
|
|||
(attrNames def.commands))
|
||||
+ "\n"
|
||||
else "")
|
||||
+ (if def.examples or [] != []
|
||||
then
|
||||
"# Examples\n\n"
|
||||
+ concatStrings (map ({ description, command }: "${description}\n\n```console\n${command}\n```\n\n") def.examples)
|
||||
else "")
|
||||
+ (if def ? doc
|
||||
then "# Description\n\n" + def.doc + "\n\n"
|
||||
else "")
|
||||
|
@ -27,11 +32,7 @@ let
|
|||
if s != ""
|
||||
then "# Flags\n\n${s}"
|
||||
else "")
|
||||
+ (if def.examples or [] != []
|
||||
then
|
||||
"# Examples\n\n"
|
||||
+ concatStrings (map ({ description, command }: "${description}\n\n```console\n${command}\n```\n\n") def.examples)
|
||||
else "");
|
||||
;
|
||||
|
||||
appendName = filename: name: (if filename == "nix" then "nix3" else filename) + "-" + name;
|
||||
|
||||
|
|
Loading…
Reference in a new issue