doc: showOptions: Move union to caller

`showOptions` itself doesn't care, so it shouldn't take two separate
arguments.
This commit is contained in:
John Ericson 2023-09-22 23:54:04 -04:00
parent f89b84919c
commit 694810ba34

View file

@ -78,16 +78,15 @@ let
maybeOptions = optionalString (details.flags != {}) '' maybeOptions = optionalString (details.flags != {}) ''
# Options # Options
${showOptions details.flags toplevel.flags} ${showOptions (details.flags // toplevel.flags)}
> **Note** > **Note**
> >
> See [`man nix.conf`](@docroot@/command-ref/conf-file.md#command-line-flags) for overriding configuration settings with command line flags. > See [`man nix.conf`](@docroot@/command-ref/conf-file.md#command-line-flags) for overriding configuration settings with command line flags.
''; '';
showOptions = options: commonOptions: showOptions = allOptions:
let let
allOptions = options // commonOptions;
showCategory = cat: '' showCategory = cat: ''
${optionalString (cat != "") "**${cat}:**"} ${optionalString (cat != "") "**${cat}:**"}