pda/testdata/list-all.ct

29 lines
1,007 B
XML

# List defaults to all stores
$ pda set lax@laa 1
$ pda set lax@lab 2
$ pda ls --key "lax" --format tsv
Meta Size TTL Store Key Value
-w-- 1 - laa lax 1
-w-- 1 - lab lax 2
$ pda ls --key "lax" --count
2
$ pda ls --key "lax" --format json
[{"key":"lax","value":"1","encoding":"text","store":"laa"},{"key":"lax","value":"2","encoding":"text","store":"lab"}]
# Positional arg narrows to one store
$ pda ls laa --key "lax" --format tsv
Meta Size TTL Store Key Value
-w-- 1 - laa lax 1
# --store glob filter
$ pda ls --store "la?" --key "lax" --format tsv
Meta Size TTL Store Key Value
-w-- 1 - laa lax 1
-w-- 1 - lab lax 2
$ pda ls --store "laa" --key "lax" --format tsv
Meta Size TTL Store Key Value
-w-- 1 - laa lax 1
# --store cannot be combined with positional arg
$ pda ls --store "laa" laa --> FAIL
FAIL cannot use --store with a store argument
# --store no matches
$ pda ls --store "nonexistent" --key "lax" --> FAIL
FAIL cannot ls 'all': no matches for key pattern 'lax' and store pattern 'nonexistent'