From: Nathaniel Wesley Filardo Date: Sat, 12 Mar 2022 21:06:15 +0000 (+0000) Subject: cdb:argparse_for_render return options to caller X-Git-Url: https://hydra-www.ietfng.org/gitweb/?a=commitdiff_plain;h=bc916bc7253e6487bad283a1d546868bc413fc00;p=csdb cdb:argparse_for_render return options to caller --- 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)