New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handling of backslashes in CLI client "unexpected" #755
Comments
how about using del "blah\tblah" |
Just tested on redis-server 2.6.2: redis 127.0.0.1:6379> FLUSHDB
OK
redis 127.0.0.1:6379> KEYS *
(empty list or set)
redis 127.0.0.1:6379> set "blah\tblah" foo
OK
redis 127.0.0.1:6379> set "blah\\blah" foo
OK
redis 127.0.0.1:6379> set "blah\n\blah" foo
OK
redis 127.0.0.1:6379> KEYS *
1) "blah\n\blah"
2) "blah\\blah"
3) "blah\tblah"
redis 127.0.0.1:6379> del "blah\tblah"
(integer) 1
redis 127.0.0.1:6379> del "blah\\blah"
(integer) 1
redis 127.0.0.1:6379> del "blah\n\blah"
(integer) 1
redis 127.0.0.1:6379> KEYS *
(empty list or set) As noted by @charsyam, you have tested GNU readline rather than the SET command of redis. So wrap your escape characters into quotes |
my result is also similar with @moreaki charsyam@ubuntu:~/projects/redis$ src/redis-cli
|
@moreaki Just to clarify this: redis-cli does not use readline, but linenoise, antirez' own alternative to readline (with similar behaviour) |
@badboy: That's exactly true, thank you for mentioning it. In fact I wish we'd replace existing GNU tools (for example the notoriously big bash) with linenoise to reduce the noise and have significantly smaller binaries for let's say ARM environments. I hope Chet Ramey won't be offended by this ;). |
For anyone stumbling upon this issue, this article could apply if you're using Git bash for Windows. http://stackoverflow.com/questions/37051203/how-do-i-pass-a-literal-forward-slash-into-node-js-in-git-bash-for-windows |
LOL: i was having a discussion with a colleague about why we should NOT use hard tabs for separators in our redis db and accidentally found a bug: the CLI client seems to mis-handle keys which contain the escape sequence \t (it was trying to prove to my colleague that there is "no way" the CLI client interprets that as a tab):
i am not sure how i can delete this key (not that i need to - this is a dummy instance).
The text was updated successfully, but these errors were encountered: