mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 16:18:28 -05:00
4836ae32c7
There are two changes in this commit: 1. Add -X option to redis-cli. Currently `-x` can only be used to provide the last argument, so you can do `redis-cli dump keyname > key.dump`, and then do `redis-cli -x restore keyname 0 < key.dump`. But what if you want to add the replace argument (which comes last?). oran suggested adding such usage: `redis-cli -X <tag> restore keyname <tag> replace < key.dump` i.e. you're able to provide a string in the arguments that's gonna be substituted with the content from stdin. Note that the tag name should not conflict with others non-replaced args. And the -x and -X options are conflicting. Some usages: ``` [root]# echo mypasswd | src/redis-cli -X passwd_tag mset username myname password passwd_tag OK [root]# echo username > username.txt [root]# head -c -1 username.txt | src/redis-cli -X name_tag mget name_tag password 1) "myname" 2) "mypasswd\n" ``` 2. Handle the combination of both `-x` and `--cluster` or `-X` and `--cluster` Extend the broadcast option to receive the last arg or <tag> arg from the stdin. Now we can use `redis-cli -x --cluster call <host>:<port> cmd`, or `redis-cli -X <tag> --cluster call <host>:<port> cmd <tag>`. (support part of #9899) |
||
---|---|---|
.. | ||
aof-race.tcl | ||
aof.tcl | ||
block-repl.tcl | ||
convert-ziplist-hash-on-load.tcl | ||
convert-ziplist-zset-on-load.tcl | ||
convert-zipmap-hash-on-load.tcl | ||
corrupt-dump-fuzzer.tcl | ||
corrupt-dump.tcl | ||
dismiss-mem.tcl | ||
failover.tcl | ||
logging.tcl | ||
psync2-master-restart.tcl | ||
psync2-pingoff.tcl | ||
psync2-reg.tcl | ||
psync2.tcl | ||
rdb.tcl | ||
redis-benchmark.tcl | ||
redis-cli.tcl | ||
replication-2.tcl | ||
replication-3.tcl | ||
replication-4.tcl | ||
replication-buffer.tcl | ||
replication-psync.tcl | ||
replication.tcl |