From bc916bc7253e6487bad283a1d546868bc413fc00 Mon Sep 17 00:00:00 2001 From: Nathaniel Wesley Filardo Date: Sat, 12 Mar 2022 21:06:15 +0000 Subject: [PATCH] cdb:argparse_for_render return options to caller --- cdb | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/cdb b/cdb index 8d40dbc..a791c69 100755 --- a/cdb +++ b/cdb @@ -143,15 +143,16 @@ local function argparse_flag_nul(c) end local function argparse_for_render(c) - c:flag("--unescape") - :description("Do not escape filenames ($f is $u); likely use --nul, too") - :default(false) - c:flag("--nul -0") - :description("NUL-terminate records ($z is NUL rather than newline)") - :default(false) - c:option("--format") + local f = c:option("--format") :description("Output format specifier") :default("$e$h $f$z") + local n = c:flag("--nul -0") + :description("NUL-terminate records ($z is NUL rather than newline)") + :default(false) + local u = c:flag("--unescape") + :description("Do not escape filenames ($f is $u); likely use --nul, too") + :default(false) + return f, n, u end local function renderer_for(args) -- 2.50.1