简体   繁体   中英

Why don't all the readline shortcuts work in psql (or IRB, or the Rails console)?

In bash and zsh, you can use handy readline shortcuts like these to navigate between words, delete from the middle of the line, etc.

However, only a couple of these (Ctrl-A and Ctrl-E and a couple of others) work in psql, IRB, and the Rails console and probably others.

Why is this, and how hard would it be to fix it? It sure would be handy to be able to quickly navigate between words in a long SQL query.

Are your copies of psql &c built with readline?

From the sound of it, yours might be built with an alternate editing library like libedit . To get all the features of readline , build them using it.

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