From: Nathaniel Wesley Filardo Date: Sat, 19 Feb 2022 13:18:52 +0000 (+0000) Subject: Accumulated nits X-Git-Url: https://hydra-www.ietfng.org/gitweb/?a=commitdiff_plain;h=cb3918b40769a99b5e5125e2d17d71a8a2b10100;p=csdb Accumulated nits --- diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..ecf3cd6 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +cdb linguist-language=Lua +cdb-util linguist-language=Lua diff --git a/README.rst b/README.rst index fa06bf7..f031933 100644 --- a/README.rst +++ b/README.rst @@ -192,8 +192,8 @@ Superseder records can also be added from ``stdin`` using ``addsuperhash`` (or old-digest new-digest notes -The ``notes`` field extends to the end of the line; if newlines are desired in -the recorded notes, use ``--inul`` and separate records by NUL bytes. +The ``notes`` field extends to the end of the record; if newlines are desired in +the recorded notes, use ``--inul`` (``-1``) and separate records by NUL bytes. Ingest ====== diff --git a/cdb b/cdb index e23758e..8d40dbc 100755 --- a/cdb +++ b/cdb @@ -182,6 +182,7 @@ end -------------------- Argparse Globals and Command Grouping part 1 {{{ local argp = argparse("cdb", "checksum database tool") +-- TODO: argp:add_help_command() -- global options must come before commands, and must be options rather than -- arguments if we want --help to do the right thing, sadly. diff --git a/cdb-util b/cdb-util index 87fd60b..a96a4e6 100755 --- a/cdb-util +++ b/cdb-util @@ -10,6 +10,9 @@ local plpath = require "pl.path" plapp.require_here() local cdblib = require "cdblib" +----------------------------------------------------------------- }}} +---------------------------------------------- Argparse utilities {{{ + local function argparse_flag_nul(c) return c:flag("--nul -0") :description("NUL-terminate output records") diff --git a/cdblib.lua b/cdblib.lua index f6cc9fc..c902360 100644 --- a/cdblib.lua +++ b/cdblib.lua @@ -1,3 +1,4 @@ +-- Library of code shared by cdb and cdb-util programs -- SPDX-License-Identifier: AGPL-3.0-or-later local plstringx = require "pl.stringx"