feat(del): adds glob support for deletion
This commit is contained in:
parent
14897ba587
commit
badbf3b6bb
6 changed files with 145 additions and 19 deletions
10
testdata/del__glob__ok.ct
vendored
Normal file
10
testdata/del__glob__ok.ct
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
$ pda set a1 1
|
||||
$ pda set a2 2
|
||||
$ pda set b1 3
|
||||
$ pda del --glob a* --force
|
||||
$ pda get a1 --> FAIL
|
||||
Error: cannot get 'a1': Key not found
|
||||
$ pda get a2 --> FAIL
|
||||
Error: cannot get 'a2': Key not found
|
||||
$ pda get b1
|
||||
3
|
||||
2
testdata/help__del__ok.ct
vendored
2
testdata/help__del__ok.ct
vendored
|
|
@ -10,6 +10,7 @@ Aliases:
|
|||
|
||||
Flags:
|
||||
-f, --force Force delete without confirmation
|
||||
-g, --glob Treat KEY arguments as glob patterns
|
||||
-h, --help help for del
|
||||
Delete one or more keys. Optionally specify a db.
|
||||
|
||||
|
|
@ -21,4 +22,5 @@ Aliases:
|
|||
|
||||
Flags:
|
||||
-f, --force Force delete without confirmation
|
||||
-g, --glob Treat KEY arguments as glob patterns
|
||||
-h, --help help for del
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue