Search code examples
redisredis-cli

Up arrow key not toggling commands within redis-cli (linux server)


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.


Solution

  • 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.