diff --git a/testdata/dump__glob__ok.ct b/testdata/dump__glob__ok.ct index b58c19c..87ca9da 100644 --- a/testdata/dump__glob__ok.ct +++ b/testdata/dump__glob__ok.ct @@ -5,4 +5,4 @@ $ pda dump --glob a* {"key":"a1","value":"1","encoding":"text"} {"key":"a2","value":"2","encoding":"text"} $ pda dump --glob c* --> FAIL -Error: No matches for pattern 'c*' +Error: cannot ls '@default': No matches for pattern 'c*' diff --git a/testdata/get__missing__err.ct b/testdata/get__missing__err.ct index ced6568..0a54c6c 100644 --- a/testdata/get__missing__err.ct +++ b/testdata/get__missing__err.ct @@ -1,2 +1,2 @@ $ pda get foobar --> FAIL -Error: cannot get 'foobar': Key not found +Error: cannot get 'foobar': No such key diff --git a/testdata/get__missing__err__with__any.ct b/testdata/get__missing__err__with__any.ct index 1d3012f..c942bcb 100644 --- a/testdata/get__missing__err__with__any.ct +++ b/testdata/get__missing__err__with__any.ct @@ -5,10 +5,10 @@ $ pda get foobar --include-binary --run --secret --> FAIL $ pda get foobar --run --> FAIL $ pda get foobar --run --secret --> FAIL $ pda get foobar --secret --> FAIL -Error: cannot get 'foobar': Key not found -Error: cannot get 'foobar': Key not found -Error: cannot get 'foobar': Key not found +Error: cannot get 'foobar': No such key +Error: cannot get 'foobar': No such key +Error: cannot get 'foobar': No such key Error: unknown flag: --secret -Error: cannot get 'foobar': Key not found +Error: cannot get 'foobar': No such key Error: unknown flag: --secret Error: unknown flag: --secret diff --git a/testdata/help__dump__ok.ct b/testdata/help__dump__ok.ct index 09c7e2e..2bcce3b 100644 --- a/testdata/help__dump__ok.ct +++ b/testdata/help__dump__ok.ct @@ -1,6 +1,6 @@ $ pda help dump $ pda dump --help -Dump all key/value pairs as NDJSON +Export store as NDJSON (alias for list --format ndjson) Usage: pda export [STORE] [flags] @@ -13,7 +13,7 @@ Flags: -g, --glob strings Filter keys with glob pattern (repeatable) --glob-sep string Characters treated as separators for globbing (default "/-_.@: ") -h, --help help for export -Dump all key/value pairs as NDJSON +Export store as NDJSON (alias for list --format ndjson) Usage: pda export [STORE] [flags] diff --git a/testdata/help__list__ok.ct b/testdata/help__list__ok.ct index dd943f9..b8b5af3 100644 --- a/testdata/help__list__ok.ct +++ b/testdata/help__list__ok.ct @@ -10,7 +10,8 @@ Aliases: Flags: -b, --binary include binary data in text output - -o, --format format output format (table|tsv|csv|markdown|html) (default table) + -e, --encoding string value encoding for ndjson format: auto, base64, or text (default "auto") + -o, --format format output format (table|tsv|csv|markdown|html|ndjson) (default table) -g, --glob strings Filter keys with glob pattern (repeatable) --glob-sep string Characters treated as separators for globbing (default "/-_.@: ") --header include header row @@ -28,7 +29,8 @@ Aliases: Flags: -b, --binary include binary data in text output - -o, --format format output format (table|tsv|csv|markdown|html) (default table) + -e, --encoding string value encoding for ndjson format: auto, base64, or text (default "auto") + -o, --format format output format (table|tsv|csv|markdown|html|ndjson) (default table) -g, --glob strings Filter keys with glob pattern (repeatable) --glob-sep string Characters treated as separators for globbing (default "/-_.@: ") --header include header row diff --git a/testdata/help__ok.ct b/testdata/help__ok.ct index 7065f74..4acbf58 100644 --- a/testdata/help__ok.ct +++ b/testdata/help__ok.ct @@ -22,7 +22,7 @@ Key commands: set Set a key to a given value Store commands: - export Dump all key/value pairs as NDJSON + export Export store as NDJSON (alias for list --format ndjson) import Restore key/value pairs from an NDJSON dump list-stores List all stores remove-store Delete a store @@ -63,7 +63,7 @@ Key commands: set Set a key to a given value Store commands: - export Dump all key/value pairs as NDJSON + export Export store as NDJSON (alias for list --format ndjson) import Restore key/value pairs from an NDJSON dump list-stores List all stores remove-store Delete a store diff --git a/testdata/help__restore__ok.ct b/testdata/help__restore__ok.ct index b9fa6e5..106a0f9 100644 --- a/testdata/help__restore__ok.ct +++ b/testdata/help__restore__ok.ct @@ -9,6 +9,7 @@ Aliases: import, restore Flags: + --drop Drop existing entries before restoring (full replace) -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 "/-_.@: ") @@ -23,6 +24,7 @@ Aliases: import, restore Flags: + --drop Drop existing entries before restoring (full replace) -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 "/-_.@: ") diff --git a/testdata/help__set__ok.ct b/testdata/help__set__ok.ct index 345ee88..d1e2f57 100644 --- a/testdata/help__set__ok.ct +++ b/testdata/help__set__ok.ct @@ -1,7 +1,7 @@ $ pda help set $ pda set --help Set a key to a given value or stdin. Optionally specify a store. - + PDA supports parsing Go templates. Actions are delimited with {{ }}. For example: @@ -22,7 +22,7 @@ Flags: -i, --interactive Prompt before overwriting an existing key -t, --ttl duration Expire the key after the provided duration (e.g. 24h, 30m) Set a key to a given value or stdin. Optionally specify a store. - + PDA supports parsing Go templates. Actions are delimited with {{ }}. For example: diff --git a/testdata/remove__dedupe__ok.ct b/testdata/remove__dedupe__ok.ct index 042c536..e5ec064 100644 --- a/testdata/remove__dedupe__ok.ct +++ b/testdata/remove__dedupe__ok.ct @@ -10,6 +10,6 @@ $ pda ls foo 1 $ pda rm foo --glob "*" $ pda get bar --> FAIL -Error: cannot get 'bar': Key not found +Error: cannot get 'bar': No such key $ pda get foo --> FAIL -Error: cannot get 'foo': Key not found +Error: cannot get 'foo': No such key diff --git a/testdata/remove__glob__mixed__ok.ct b/testdata/remove__glob__mixed__ok.ct index 332a475..9433c89 100644 --- a/testdata/remove__glob__mixed__ok.ct +++ b/testdata/remove__glob__mixed__ok.ct @@ -3,8 +3,8 @@ $ pda set bar1 2 $ pda set bar2 3 $ pda rm foo --glob bar* $ pda get foo --> FAIL -Error: cannot get 'foo': Key not found +Error: cannot get 'foo': No such key $ pda get bar1 --> FAIL -Error: cannot get 'bar1': Key not found +Error: cannot get 'bar1': No such key $ pda get bar2 --> FAIL -Error: cannot get 'bar2': Key not found +Error: cannot get 'bar2': No such key diff --git a/testdata/remove__glob__ok.ct b/testdata/remove__glob__ok.ct index 81fe095..3fda37c 100644 --- a/testdata/remove__glob__ok.ct +++ b/testdata/remove__glob__ok.ct @@ -3,8 +3,8 @@ $ pda set a2 2 $ pda set b1 3 $ pda rm --glob a* $ pda get a1 --> FAIL -Error: cannot get 'a1': Key not found +Error: cannot get 'a1': No such key. Did you mean 'b1'? $ pda get a2 --> FAIL -Error: cannot get 'a2': Key not found +Error: cannot get 'a2': No such key $ pda get b1 3 diff --git a/testdata/remove__multiple__ok.ct b/testdata/remove__multiple__ok.ct index 395e009..d61e113 100644 --- a/testdata/remove__multiple__ok.ct +++ b/testdata/remove__multiple__ok.ct @@ -2,6 +2,6 @@ $ pda set a 1 $ pda set b 2 $ pda rm a b $ pda get a --> FAIL -Error: cannot get 'a': Key not found +Error: cannot get 'a': No such key $ pda get b --> FAIL -Error: cannot get 'b': Key not found +Error: cannot get 'b': No such key. Did you mean 'b1'? diff --git a/testdata/restore__glob__ok.ct b/testdata/restore__glob__ok.ct index 3aa0b44..eae61f8 100644 --- a/testdata/restore__glob__ok.ct +++ b/testdata/restore__glob__ok.ct @@ -10,6 +10,6 @@ $ pda get a1 $ pda get a2 2 $ pda get b1 --> FAIL -Error: cannot get 'b1': Key not found +Error: cannot get 'b1': No such key. Did you mean 'a1'? $ pda restore --glob c* --file dumpfile --> FAIL Error: cannot restore '@default': No matches for pattern 'c*' diff --git a/testdata/root__ok.ct b/testdata/root__ok.ct index 099e74b..e5c16d7 100644 --- a/testdata/root__ok.ct +++ b/testdata/root__ok.ct @@ -21,7 +21,7 @@ Key commands: set Set a key to a given value Store commands: - export Dump all key/value pairs as NDJSON + export Export store as NDJSON (alias for list --format ndjson) import Restore key/value pairs from an NDJSON dump list-stores List all stores remove-store Delete a store