feat(globs): glob support for dump/restore, extracts some shared logic

This commit is contained in:
Lewis Wynne 2025-12-17 22:18:15 +00:00
parent 9869b663e2
commit 7890e9451d
9 changed files with 141 additions and 57 deletions

View file

@ -9,8 +9,10 @@ Aliases:
restore, import
Flags:
-f, --file string Path to an NDJSON dump (defaults to stdin)
-h, --help help for restore
-f, --file string Path to an NDJSON dump (defaults to stdin)
-g, --glob strings Restore keys matching glob pattern (repeatable)
--glob-sep string Characters treated as separators for globbing (default "/-_.@: ")
-h, --help help for restore
Restore key/value pairs from an NDJSON dump
Usage:
@ -20,5 +22,7 @@ Aliases:
restore, import
Flags:
-f, --file string Path to an NDJSON dump (defaults to stdin)
-h, --help help for restore
-f, --file string Path to an NDJSON dump (defaults to stdin)
-g, --glob strings Restore keys matching glob pattern (repeatable)
--glob-sep string Characters treated as separators for globbing (default "/-_.@: ")
-h, --help help for restore