3

On a Ubuntu-based production server, I usually toggle through redis keys inside redis-cli by just pressing the up arrow key.

I suddenly find that this isn't working any more. Ergo, there's nothing shown after pressing the up arrow key, even if I've left a trail of commands.

All other commands are working correctly (I tried info, a bunch of lrange and zrange commands for example). The arrow-key behavior works correctly on localhost as well.

By the way, this issue is specific to redis-cli. The terminal correctly allows me to toggle through linux commands via the arrow-key.

Is something corrupted within redis-cli? Would be great to get advice from someone who's experienced this problem. In case it matters, redis-cli -v displays redis-cli 4.0.2.

Hassan Baig
  • 15,055
  • 27
  • 102
  • 205

1 Answers1

4

I had the exact same behavior using the Terminal app on OS X to connect to and AWS EC2 running Ubuntu: the arrows keys worked perfectly fine except in redis-cli. Ultimately, I opened a new Terminal tab the arrows worked fine again in redis-cli.

jsnow
  • 1,399
  • 1
  • 9
  • 7
  • Any idea whether this a `redis-cli` bug? – Hassan Baig Nov 06 '18 at 19:36
  • I'm not sure. I actually found your post looking for a solution myself. I tried several things trying to update redis-tools etc..., but in the end it just seemed to be tied to the Terminal app on my laptop. – jsnow Nov 06 '18 at 22:06
  • Same thing happened to me... up-arrow stopped working in `redis-cli` even though it worked everywhere else, opened a new terminal & it started working again. Very frustrating! Using Windows Terminal to SSH into an Ubuntu VM. – Tobias J Feb 11 '21 at 23:49
  • Probably some form of redis-cli bug which makes it break, happens to me semi-regularly. – Hakaishin Apr 11 '22 at 11:31