feat: default ttl and header visibility, and removed unnecessray padding from tab output
This commit is contained in:
parent
07330be10b
commit
24853bfce8
6 changed files with 232 additions and 69 deletions
10
testdata/help__list__ok.ct
vendored
10
testdata/help__list__ok.ct
vendored
|
|
@ -11,13 +11,14 @@ Aliases:
|
|||
Flags:
|
||||
-b, --base64 view binary data as base64
|
||||
-o, --format format output format (table|tsv|csv|markdown|html|ndjson) (default table)
|
||||
-f, --full show full values without truncation
|
||||
-g, --glob strings Filter keys with glob pattern (repeatable)
|
||||
--glob-sep string Characters treated as separators for globbing (default '/-_.@: ')
|
||||
--header include header row
|
||||
-h, --help help for list
|
||||
--no-header suppress the header row
|
||||
--no-keys suppress the key column
|
||||
--no-ttl suppress the TTL column
|
||||
--no-values suppress the value column
|
||||
-t, --ttl append a TTL column when entries expire
|
||||
List the contents of a store
|
||||
|
||||
Usage:
|
||||
|
|
@ -29,10 +30,11 @@ Aliases:
|
|||
Flags:
|
||||
-b, --base64 view binary data as base64
|
||||
-o, --format format output format (table|tsv|csv|markdown|html|ndjson) (default table)
|
||||
-f, --full show full values without truncation
|
||||
-g, --glob strings Filter keys with glob pattern (repeatable)
|
||||
--glob-sep string Characters treated as separators for globbing (default '/-_.@: ')
|
||||
--header include header row
|
||||
-h, --help help for list
|
||||
--no-header suppress the header row
|
||||
--no-keys suppress the key column
|
||||
--no-ttl suppress the TTL column
|
||||
--no-values suppress the value column
|
||||
-t, --ttl append a TTL column when entries expire
|
||||
|
|
|
|||
8
testdata/list__glob__ok.ct
vendored
8
testdata/list__glob__ok.ct
vendored
|
|
@ -2,9 +2,11 @@ $ pda set a1@lg 1
|
|||
$ pda set a2@lg 2
|
||||
$ pda set b1@lg 3
|
||||
$ pda ls lg --glob a* --format tsv
|
||||
a1 1
|
||||
a2 2
|
||||
Key Value TTL
|
||||
a1 1 no expiry
|
||||
a2 2 no expiry
|
||||
$ pda ls lg --glob b* --format tsv
|
||||
b1 3
|
||||
Key Value TTL
|
||||
b1 3 no expiry
|
||||
$ pda ls lg --glob c* --> FAIL
|
||||
FAIL cannot ls '@lg': no matches for pattern 'c*'
|
||||
|
|
|
|||
18
testdata/remove__dedupe__ok.ct
vendored
18
testdata/remove__dedupe__ok.ct
vendored
|
|
@ -1,15 +1,15 @@
|
|||
$ pda set foo 1
|
||||
$ pda set bar 2
|
||||
$ pda ls
|
||||
a echo hello
|
||||
|
||||
a1 1
|
||||
a2 2
|
||||
b1 3
|
||||
bar 2
|
||||
copied-key hidden-value
|
||||
foo 1
|
||||
moved-key hidden-value
|
||||
KEY VALUE TTL
|
||||
a echo hello (..1 more chars) no expiry
|
||||
a1 1 no expiry
|
||||
a2 2 no expiry
|
||||
b1 3 no expiry
|
||||
bar 2 no expiry
|
||||
copied-key hidden-value no expiry
|
||||
foo 1 no expiry
|
||||
moved-key hidden-value no expiry
|
||||
$ pda rm foo --glob "*"
|
||||
$ pda get bar --> FAIL
|
||||
FAIL cannot get 'bar': no such key
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue