From 8c6a05c8c99819dbd85d555cb50596637d57df44 Mon Sep 17 00:00:00 2001 From: Gabriel Gonzalez Date: Fri, 13 Dec 2019 18:19:24 -0800 Subject: [PATCH] Rename `renderOptions` to `encodeGNUCommandLine` ... as suggested by @edolstra --- lib/cli.nix | 4 ++-- lib/default.nix | 2 +- lib/tests/misc.nix | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/cli.nix b/lib/cli.nix index d794778b21a4..23fab8ec9703 100644 --- a/lib/cli.nix +++ b/lib/cli.nix @@ -6,10 +6,10 @@ boilerplate related to command-line construction for simple use cases. Example: - renderOptions { foo = "A"; bar = 1; baz = null; qux = true; v = true; } + encodeGNUCommandLine { foo = "A"; bar = 1; baz = null; qux = true; v = true; } => " --bar '1' --foo 'A' --qux -v" */ - renderOptions = + encodeGNUCommandLine = options: let render = key: value: diff --git a/lib/default.nix b/lib/default.nix index 5798c6bba007..a7b00f01e0df 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -121,7 +121,7 @@ let isOptionType mkOptionType; inherit (asserts) assertMsg assertOneOf; - inherit (cli) renderOptions; + inherit (cli) encodeGNUCommandLine; inherit (debug) addErrorContextToAttrs traceIf traceVal traceValFn traceXMLVal traceXMLValMarked traceSeq traceSeqN traceValSeq traceValSeqFn traceValSeqN traceValSeqNFn traceShowVal diff --git a/lib/tests/misc.nix b/lib/tests/misc.nix index a5f191410e54..c0a48f472cce 100644 --- a/lib/tests/misc.nix +++ b/lib/tests/misc.nix @@ -443,7 +443,7 @@ runTests { testRenderOptions = { expr = - renderOptions + encodeGNUCommandLine { foo = "A"; bar = 1;