简体   繁体   English

为什么所有的readline快捷方式都不能在psql(或IRB或Rails控制台)中运行?

[英]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. 在bash和zsh中,您可以使用这些方便的readline快捷键在单词之间导航,从行中间删除等。

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. 但是,只有其中几个(Ctrl-A和Ctrl-E以及其他几个)在psql,IRB和Rails控制台以及其他可能的其他控制台中工作。

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. 能够在长SQL查询中的单词之间快速导航肯定会很方便。

Are your copies of psql &c built with readline? 你的psql&c副本是用readline构建的吗?

From the sound of it, yours might be built with an alternate editing library like libedit . 从它的声音,你可能会建立一个替代编辑库,如libedit To get all the features of readline , build them using it. 要获得readline的所有功能,请使用它来构建它们。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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