简体   繁体   中英

Vi Mode for redis-cli

I have set editing-mode vi in .inputrc, which affects consoles for Ruby, MySQL, etc. It doesn't work for Redis though and I'm wondering if there's any way to make it so (ideally on OSX and Linux).

(It's mentioned here too.)

As @h2ero said redis-cli provides own line editing layer and it doesn't use readline .

Try to use rlwrap :

$ rlwrap -a -- redis-cli 

I have downloaded redis source code and found redis cli it hadn't used readline library (readline/readline.h). so it can't use key binding.

http://cnswww.cns.cwru.edu/php/chet/readline/readline.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM